From: VMware, Inc <> Date: Thu, 17 Jun 2010 21:30:02 +0000 (-0700) Subject: Replace RpcOut API with RpcChannel_Send() in vmtoolsd plugins. X-Git-Tag: 2010.06.16-268169~114 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=70b2bbc2fd3f1de64d1b8836cf8b49e237744d2e;p=thirdparty%2Fopen-vm-tools.git Replace RpcOut API with RpcChannel_Send() in vmtoolsd plugins. This doesn't cover all existing cases, but the others can't switch just yet. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/services/plugins/resolutionSet/resolutionSet.c b/open-vm-tools/services/plugins/resolutionSet/resolutionSet.c index 0ea6f90a7..8856faaf3 100644 --- a/open-vm-tools/services/plugins/resolutionSet/resolutionSet.c +++ b/open-vm-tools/services/plugins/resolutionSet/resolutionSet.c @@ -66,12 +66,6 @@ static const char *rpcChannelName = NULL; */ ResolutionInfoType resolutionInfo; -/* - * Local function prototypes - */ - -static void ResolutionSetServerCapability(unsigned int value); - /* * Global function definitions @@ -384,24 +378,29 @@ ResolutionSetShutdown(gpointer src, /** * Sends the tools.capability.resolution_server RPC to the VMX. * + * @param[in] chan The RPC channel. * @param[in] value The value to send for the capability bit. */ -void -ResolutionSetServerCapability(unsigned int value) + +static void +ResolutionSetServerCapability(RpcChannel *chan, + unsigned int value) { + gchar *msg; + if (!rpcChannelName) { g_debug("Channel name is null, RPC not sent.\n"); return; } - if (!RpcOut_sendOne(NULL, - NULL, - "tools.capability.resolution_server %s %d", - rpcChannelName, - value)) { + msg = g_strdup_printf("tools.capability.resolution_server %s %d", + rpcChannelName, + value); + if (!RpcChannel_Send(chan, msg, strlen(msg), NULL, NULL)) { g_warning("%s: Unable to set tools.capability.resolution_server\n", __FUNCTION__); } + g_free(msg); } @@ -457,7 +456,7 @@ ResolutionSetCapabilities(gpointer src, * resolution set RPCs as an argument. */ if (ctx && ctx->rpc && ctx->isVMware) { - ResolutionSetServerCapability(set ? 1 : 0); + ResolutionSetServerCapability(ctx->rpc, set ? 1 : 0); } }