This RPC tells us the guest agent is up and ready, and invokes guest agent capability negotiation
Signed-off-by: Michael Roth <mdr...@linux.vnet.ibm.com> --- virtagent-server.c | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/virtagent-server.c b/virtagent-server.c index ab8994b..b7e51ed 100644 --- a/virtagent-server.c +++ b/virtagent-server.c @@ -232,6 +232,26 @@ static xmlrpc_value *va_ping(xmlrpc_env *env, return result; } +/* va_hello(): handle client startup notification + * rpc return values: none + */ + +static xmlrpc_value *va_hello(xmlrpc_env *env, + xmlrpc_value *params, + void *user_data) +{ + xmlrpc_value *result; + int ret; + TRACE("called"); + SLOG("va_hello()"); + result = xmlrpc_build_value(env, "s", "dummy"); + ret = va_client_init_capabilities(); + if (ret < 0) { + LOG("error setting initializing client capabilities"); + } + return result; +} + typedef struct RPCFunction { xmlrpc_value *(*func)(xmlrpc_env *env, xmlrpc_value *param, void *unused); const char *func_name; @@ -251,6 +271,8 @@ static RPCFunction guest_functions[] = { static RPCFunction host_functions[] = { { .func = va_ping, .func_name = "va.ping" }, + { .func = va_hello, + .func_name = "va.hello" }, { NULL, NULL } }; -- 1.7.0.4