From: Oliver Kurth Date: Fri, 26 Oct 2018 17:44:55 +0000 (-0700) Subject: ToolsCore_GetVmusrLimit(): use app name from ToolsServiceState struct X-Git-Tag: stable-11.0.0~388 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e1e6d8a55bc67dc084ea92e9d449acaf1968ad3;p=thirdparty%2Fopen-vm-tools.git ToolsCore_GetVmusrLimit(): use app name from ToolsServiceState struct The vmusr process on Windows is calling ToolsCore_GetVmusrLimit() early in the process before ToolsCore_Setup() is called to initialize the ctx member. In ToolsCore_GetVmusrLimit(), changing the call to VMTools_ConfigGetInteger to use "state->name" instead of the state->ctx.name. --- diff --git a/open-vm-tools/services/vmtoolsd/mainLoop.c b/open-vm-tools/services/vmtoolsd/mainLoop.c index fdbf5078a..aabc25cea 100644 --- a/open-vm-tools/services/vmtoolsd/mainLoop.c +++ b/open-vm-tools/services/vmtoolsd/mainLoop.c @@ -534,7 +534,7 @@ ToolsCore_GetVmusrLimit(ToolsServiceState *state) // IN if (TOOLS_IS_USER_SERVICE(state)) { errorLimit = VMTools_ConfigGetInteger(state->ctx.config, - state->ctx.name, + state->name, CONFNAME_MAX_CHANNEL_ATTEMPTS, VMUSR_CHANNEL_ERR_DEFAULT); @@ -547,7 +547,7 @@ ToolsCore_GetVmusrLimit(ToolsServiceState *state) // IN errorLimit > VMUSR_CHANNEL_ERR_MAX)) { g_warning("%s: Invalid %s: %s (%d) specified in tools configuration; " "using default value (%d)\n", __FUNCTION__, - state->ctx.name, CONFNAME_MAX_CHANNEL_ATTEMPTS, + state->name, CONFNAME_MAX_CHANNEL_ATTEMPTS, errorLimit, VMUSR_CHANNEL_ERR_DEFAULT); errorLimit = VMUSR_CHANNEL_ERR_DEFAULT; }