Signed-off-by: Michael Roth <mdr...@linux.vnet.ibm.com> --- virtagent-server.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/virtagent-server.c b/virtagent-server.c index f84546b..b0fc0c4 100644 --- a/virtagent-server.c +++ b/virtagent-server.c @@ -101,15 +101,31 @@ static QDict *va_capabilities(const QDict *params) return va_server_format_response(ret, 0, NULL); } +/* va_ping(): respond to/pong to client. + * params/response qdict format (*=optional): + * response{error}: <error code> + * response{errstr}: <error description> + */ +static QDict *va_ping(const QDict *params) +{ + TRACE("called"); + SLOG("va_ping()"); + return va_server_format_response(NULL, 0, NULL); +} + static VARPCFunction guest_functions[] = { { .func = va_capabilities, .func_name = "capabilities" }, + { .func = va_ping, + .func_name = "ping" }, { NULL, NULL } }; static VARPCFunction host_functions[] = { { .func = va_hello, .func_name = "hello" }, + { .func = va_ping, + .func_name = "ping" }, { NULL, NULL } }; -- 1.7.0.4