[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC][PATCH v7 10/16] virtagent: add "ping" RPC to server
From: |
Michael Roth |
Subject: |
[Qemu-devel] [RFC][PATCH v7 10/16] virtagent: add "ping" RPC to server |
Date: |
Mon, 7 Mar 2011 14:10:36 -0600 |
Signed-off-by: Michael Roth <address@hidden>
---
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