Refactor RPC client private data setup

Currently there is a hook function that is invoked when a
new client connection comes in, which allows an app to
setup private data. This setup will make it difficult to
serialize client state during process re-exec(). Change to
a model where the app registers a callback when creating
the virNetServerPtr instance, which is used to allocate
the client private data immediately during virNetClientPtr
construction.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange
2012-08-09 12:31:34 +01:00
parent 07143d84ba
commit 39b5e4d4d8
9 changed files with 63 additions and 60 deletions

View File

@@ -1196,6 +1196,7 @@ int main(int argc, char **argv) {
!!config->keepalive_required,
config->mdns_adv ? config->mdns_name : NULL,
remoteClientInitHook,
remoteClientFreeFunc,
NULL))) {
ret = VIR_DAEMON_ERR_INIT;
goto cleanup;