]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Don't try to use broken RPC channel
authorOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:44 +0000 (11:23 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:44 +0000 (11:23 -0700)
Make sure RPC channel exists before trying to use it.

open-vm-tools/services/vmtoolsd/mainLoop.c

index 096831c6ac8d0a2421b2cd300c699118d380b2b7..79c5df531ad2243b93e40120da069638dbf8c0da 100644 (file)
@@ -192,9 +192,6 @@ ToolsCoreReportVersionData(ToolsServiceState *state)
    char *value;
    const static char cmdPrefix[] = "info-set guestinfo.vmtools.";
 
-   ASSERT(state);
-   ASSERT(state->ctx.rpc);
-
    /*
     * These values are documented with specific formats.  Do not change
     * the formats, as client code can depend on them.
@@ -287,7 +284,9 @@ ToolsCoreRunLoop(ToolsServiceState *state)
    }
 
    /* Report version info as guest Vars */
-   ToolsCoreReportVersionData(state);
+   if (state->ctx.rpc) {
+      ToolsCoreReportVersionData(state);
+   }
 
    if (!ToolsCore_LoadPlugins(state)) {
       return 1;