mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 06:35:24 +00:00
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: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
99d69f6925
commit
b42c591fec
@ -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__ */
|
||||
|
Loading…
Reference in New Issue
Block a user