From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=32897 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Peowc-00071J-Ks for qemu-devel@nongnu.org; Mon, 17 Jan 2011 08:16:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PeowY-0006Ht-TU for qemu-devel@nongnu.org; Mon, 17 Jan 2011 08:16:23 -0500 Received: from e3.ny.us.ibm.com ([32.97.182.143]:59064) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PeowY-0006Hl-KY for qemu-devel@nongnu.org; Mon, 17 Jan 2011 08:16:22 -0500 Received: from d01dlp02.pok.ibm.com (d01dlp02.pok.ibm.com [9.56.224.85]) by e3.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p0HCvJQ2021827 for ; Mon, 17 Jan 2011 07:57:24 -0500 Received: from d01relay03.pok.ibm.com (d01relay03.pok.ibm.com [9.56.227.235]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id A61964DE803B for ; Mon, 17 Jan 2011 08:13:08 -0500 (EST) Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p0HDGLZv344134 for ; Mon, 17 Jan 2011 08:16:21 -0500 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p0HDGLWo030949 for ; Mon, 17 Jan 2011 08:16:21 -0500 From: Michael Roth Date: Mon, 17 Jan 2011 07:15:08 -0600 Message-Id: <1295270117-24760-15-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1295270117-24760-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1295270117-24760-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [RFC][PATCH v6 14/23] 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, marcel.mittelstaedt@de.ibm.com, mdroth@linux.vnet.ibm.com, markus_mueller@de.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 d48c61e..ab8994b 100644 --- a/virtagent-server.c +++ b/virtagent-server.c @@ -219,6 +219,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 *params, + 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; @@ -231,9 +244,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