From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=44579 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POZzM-00025m-MS for qemu-devel@nongnu.org; Fri, 03 Dec 2010 13:04:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POZzJ-0003FX-Kh for qemu-devel@nongnu.org; Fri, 03 Dec 2010 13:04:08 -0500 Received: from e1.ny.us.ibm.com ([32.97.182.141]:36029) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POZzJ-0003FQ-IQ for qemu-devel@nongnu.org; Fri, 03 Dec 2010 13:04:05 -0500 Received: from d01dlp01.pok.ibm.com (d01dlp01.pok.ibm.com [9.56.224.56]) by e1.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id oB3Hu06F015070 for ; Fri, 3 Dec 2010 12:56:01 -0500 Received: from d01relay03.pok.ibm.com (d01relay03.pok.ibm.com [9.56.227.235]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 9940D728065 for ; Fri, 3 Dec 2010 13:04:04 -0500 (EST) Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id oB3I44wq235690 for ; Fri, 3 Dec 2010 13:04:04 -0500 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id oB3I43hQ014054 for ; Fri, 3 Dec 2010 13:04:04 -0500 From: Michael Roth Date: Fri, 3 Dec 2010 12:03:14 -0600 Message-Id: <1291399402-20366-14-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1291399402-20366-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1291399402-20366-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [RFC][PATCH v5 13/21] virtagent: add va.ping RPC List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: agl@linux.vnet.ibm.com, stefanha@linux.vnet.ibm.com, Jes.Sorensen@redhat.com, mdroth@linux.vnet.ibm.com, aliguori@linux.vnet.ibm.com, ryanh@us.ibm.com, abeekhof@redhat.com Do-nothing RPC that can be used to "ping" the RPC server Signed-off-by: Michael Roth --- virtagent-server.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/virtagent-server.c b/virtagent-server.c index 453cf0d..4a8ce7d 100644 --- a/virtagent-server.c +++ b/virtagent-server.c @@ -183,6 +183,19 @@ out_bad: return NULL; } +/* va_ping(): respond to client. response without error in env + * variable indicates successful response + * rpc return values: none + */ +static xmlrpc_value *va_ping(xmlrpc_env *env, + xmlrpc_value *param, + void *user_data) +{ + xmlrpc_value *result = xmlrpc_build_value(env, "s", "dummy"); + SLOG("va_ping()"); + return result; +} + typedef struct RPCFunction { xmlrpc_value *(*func)(xmlrpc_env *env, xmlrpc_value *param, void *unused); const char *func_name; @@ -195,9 +208,13 @@ static RPCFunction guest_functions[] = { .func_name = "va.getdmesg" }, { .func = va_shutdown, .func_name = "va.shutdown" }, + { .func = va_ping, + .func_name = "va.ping" }, { NULL, NULL } }; static RPCFunction host_functions[] = { + { .func = va_ping, + .func_name = "va.ping" }, { NULL, NULL } }; -- 1.7.0.4