From: Oliver Kurth Date: Tue, 17 Mar 2020 21:36:58 +0000 (-0700) Subject: ServiceDiscovery: Correcting warning log if operation over RPC has failed. X-Git-Tag: stable-11.1.0~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ade13b5955db0227912487b569e519f1b6241b4;p=thirdparty%2Fopen-vm-tools.git ServiceDiscovery: Correcting warning log if operation over RPC has failed. --- diff --git a/open-vm-tools/services/plugins/serviceDiscovery/serviceDiscovery.c b/open-vm-tools/services/plugins/serviceDiscovery/serviceDiscovery.c index 1ceae67c9..159ce7632 100644 --- a/open-vm-tools/services/plugins/serviceDiscovery/serviceDiscovery.c +++ b/open-vm-tools/services/plugins/serviceDiscovery/serviceDiscovery.c @@ -250,8 +250,9 @@ WriteData(ToolsAppCtx *ctx, DynBuf_GetSize(&buf), &result, &resultLen); if (!status) { - g_warning("%s: Failed to update %s, result = %s\n", __FUNCTION__, - key, result); + g_warning("%s: Failed to update %s, result: %s resultLen: %" FMTSZ + "u\n", __FUNCTION__, key, (result != NULL) ? + result : "(null)", resultLen); } if (result != NULL) { @@ -318,7 +319,9 @@ ReadData(ToolsAppCtx *ctx, DynBuf_GetSize(&buf), resultData, resultDataLen); if (!status) { - g_warning("%s: Read finished with status FALSE", __FUNCTION__); + g_warning("%s: Read over RPC failed, result: %s, resultDataLen: %" FMTSZ + "u\n", __FUNCTION__, (*resultData != NULL) ? + *resultData : "(null)", *resultDataLen); } done: DynBuf_Destroy(&buf);