提交 b42c591f 编写于 作者: D Daniel P. Berrange 提交者: Daniel P. Berrangé

admin: add support for post-exec restart callbacks

We don't have any per-client private data we need to persist, but the
RPC infrastructure requires that we provide the callbacks and serialize
an empty JSON object. This makes us future proof going forwards.
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 99d69f69
......@@ -86,6 +86,27 @@ remoteAdmClientNew(virNetServerClientPtr client ATTRIBUTE_UNUSED,
return priv;
}
void *remoteAdmClientNewPostExecRestart(virNetServerClientPtr client,
virJSONValuePtr object ATTRIBUTE_UNUSED,
void *opaque)
{
return remoteAdmClientNew(client, opaque);
}
virJSONValuePtr remoteAdmClientPreExecRestart(virNetServerClientPtr client ATTRIBUTE_UNUSED,
void *data ATTRIBUTE_UNUSED)
{
virJSONValuePtr object = virJSONValueNewObject();
if (!object)
return NULL;
/* No content to add at this time - just need empty object */
return object;
}
/* Helpers */
static virNetServerPtr
......
......@@ -33,5 +33,10 @@ extern size_t adminNProcs;
void remoteAdmClientFree(void *data);
void *remoteAdmClientNew(virNetServerClientPtr client, void *opaque);
void *remoteAdmClientNewPostExecRestart(virNetServerClientPtr client,
virJSONValuePtr object,
void *opaque);
virJSONValuePtr remoteAdmClientPreExecRestart(virNetServerClientPtr client,
void *data);
#endif /* __ADMIN_SERVER_DISPATCH_H__ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册