From: Oliver Kurth Date: Fri, 12 Jun 2020 03:43:21 +0000 (-0700) Subject: Fix misc. issues in appinfo plugin source. X-Git-Tag: stable-11.2.0~144 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5d0e1a2d33bd9060d843007d6bafebac677735d;p=thirdparty%2Fopen-vm-tools.git Fix misc. issues in appinfo plugin source. Used the proper @param and @return statements in the function documentation for AppInfoServerSetOption. Re-organized an if code block. --- diff --git a/open-vm-tools/services/plugins/appInfo/appInfo.c b/open-vm-tools/services/plugins/appInfo/appInfo.c index c190c247e..4fe67a664 100644 --- a/open-vm-tools/services/plugins/appInfo/appInfo.c +++ b/open-vm-tools/services/plugins/appInfo/appInfo.c @@ -589,14 +589,18 @@ AppInfoServerShutdown(gpointer src, // IN * * AppInfoServerSetOption -- * - * Handle TOOLSOPTION_ENABLE_APPINFO Set_Option callback. - * - * Results: - * TRUE on success. - * - * Side-effects: - * None + * Handle TOOLSOPTION_ENABLE_APPINFO Set_Option callback. * + * @param[in] src The source object. + * @param[in] ctx The app context. + * @param[in] option Option being set. + * @param[in] value Option value. + * @param[in] plugin Plugin registration data. + * + * @return TRUE if the specified option is TOOLSOPTION_ENABLE_APPINFO and + * the AppInfo Gather poll loop is reconfigured. + * FALSE if the specified option is not TOOLSOPTION_ENABLE_APPINFO + * or AppInfo Gather poll loop is not reconfigured. *---------------------------------------------------------------------------- */ @@ -610,8 +614,8 @@ AppInfoServerSetOption(gpointer src, // IN gboolean retVal = FALSE; if (strcmp(option, TOOLSOPTION_ENABLE_APPINFO) == 0) { - g_debug("Tools set option %s=%s.\n", - TOOLSOPTION_ENABLE_APPINFO, value); + g_debug("%s: Tools set option %s=%s.\n", + __FUNCTION__, TOOLSOPTION_ENABLE_APPINFO, value); if (strcmp(value, "1") == 0 && !gAppInfoEnabledInHost) { gAppInfoEnabledInHost = TRUE; @@ -620,12 +624,12 @@ AppInfoServerSetOption(gpointer src, // IN gAppInfoEnabledInHost = FALSE; retVal = TRUE; } - } - if (retVal) { - g_info("%s: State of AppInfo is changed to '%s' at host side.\n", - __FUNCTION__, gAppInfoEnabledInHost ? "enabled" : "disabled"); - TweakGatherLoop(ctx, TRUE); + if (retVal) { + g_info("%s: State of AppInfo is changed to '%s' at host side.\n", + __FUNCTION__, gAppInfoEnabledInHost ? "enabled" : "disabled"); + TweakGatherLoop(ctx, TRUE); + } } return retVal;