From patchwork Tue Nov 16 16:01:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 71420 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6283FB7144 for ; Wed, 17 Nov 2010 03:18:42 +1100 (EST) Received: from localhost ([127.0.0.1]:56701 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PIOEu-0005XO-M7 for incoming@patchwork.ozlabs.org; Tue, 16 Nov 2010 11:18:36 -0500 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 Received: from localhost.localdomain (sig-9-76-106-234.mts.ibm.com [9.76.106.234]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id oAGG24rh011388; Tue, 16 Nov 2010 11:02:36 -0500 From: Michael Roth To: qemu-devel@nongnu.org Date: Tue, 16 Nov 2010 10:01:53 -0600 Message-Id: <1289923320-5638-12-git-send-email-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.0.4 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> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Cc: aliguori@linux.vnet.ibm.com, ryanh@us.ibm.com, agl@linux.vnet.ibm.com, mdroth@linux.vnet.ibm.com, abeekhof@redhat.com Subject: [Qemu-devel] [RFC][PATCH v4 11/18] virtagent: add va_ping RPC X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 } };