提交 2128d2e9 编写于 作者: D Daniel P. Berrange 提交者: Martin Kletzander

rpc: Don't use unrelated value as privateData of client

Append privateData of the client only if there are any, otherwise the
previous value (socket data) will get there again.
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
上级 40409418
......@@ -536,13 +536,14 @@ virJSONValuePtr virNetServerClientPreExecRestart(virNetServerClientPtr client)
goto error;
}
if (client->privateData && client->privateDataPreExecRestart &&
!(child = client->privateDataPreExecRestart(client, client->privateData)))
goto error;
if (client->privateData && client->privateDataPreExecRestart) {
if (!(child = client->privateDataPreExecRestart(client, client->privateData)))
goto error;
if (virJSONValueObjectAppend(object, "privateData", child) < 0) {
virJSONValueFree(child);
goto error;
if (virJSONValueObjectAppend(object, "privateData", child) < 0) {
virJSONValueFree(child);
goto error;
}
}
virObjectUnlock(client);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册