]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
ServiceDiscovery: Correcting warning log if operation over RPC has failed.
authorOliver Kurth <okurth@vmware.com>
Tue, 17 Mar 2020 21:36:58 +0000 (14:36 -0700)
committerOliver Kurth <okurth@vmware.com>
Tue, 17 Mar 2020 21:36:58 +0000 (14:36 -0700)
open-vm-tools/services/plugins/serviceDiscovery/serviceDiscovery.c

index 1ceae67c9bdd3faa8aa04d1b8d585df698c59074..159ce76323b1b26bb0e597886b7888428acbd76c 100644 (file)
@@ -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);