From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=35139 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PINzd-0006Mr-FA for qemu-devel@nongnu.org; Tue, 16 Nov 2010 11:02:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PINzW-0005Dd-3y for qemu-devel@nongnu.org; Tue, 16 Nov 2010 11:02:47 -0500 Received: from e7.ny.us.ibm.com ([32.97.182.137]:48681) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PINzW-0005DU-1I for qemu-devel@nongnu.org; Tue, 16 Nov 2010 11:02:42 -0500 Received: from d01relay05.pok.ibm.com (d01relay05.pok.ibm.com [9.56.227.237]) by e7.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id oAGFjrOZ017847 for ; Tue, 16 Nov 2010 10:45:53 -0500 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay05.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id oAGG2fWb086294 for ; Tue, 16 Nov 2010 11:02:41 -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 oAGG2bY7014323 for ; Tue, 16 Nov 2010 11:02:38 -0500 From: Michael Roth Date: Tue, 16 Nov 2010 10:01:53 -0600 Message-Id: <1289923320-5638-12-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1289923320-5638-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1289923320-5638-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [RFC][PATCH v4 11/18] 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: aliguori@linux.vnet.ibm.com, ryanh@us.ibm.com, agl@linux.vnet.ibm.com, mdroth@linux.vnet.ibm.com, abeekhof@redhat.com Do nothing RPC that simply replies to client Signed-off-by: Michael Roth --- virtagent-daemon.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/virtagent-daemon.c b/virtagent-daemon.c index 18992dd..137641d 100644 --- a/virtagent-daemon.c +++ b/virtagent-daemon.c @@ -181,6 +181,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; +} + static int va_accept(int listen_fd) { struct sockaddr_in saddr; struct sockaddr *addr; @@ -214,9 +227,13 @@ static RPCFunction guest_functions[] = { .func_name = "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