* is not available.
*/
-/*
- * Lowest number of RPC channel errors to reasonably indicate that the
- * single allowed toolbox-dnd channel is currently in use by another
- * process.
- */
-#define VMUSR_CHANNEL_ERR_MIN 3 /* approximately 3 secs. */
-
-/*
- * The default number of vmusr channel errors before quitting the vmusr
- * process start-up.
- */
-#define VMUSR_CHANNEL_ERR_DEFAULT 5 /* approximately 5 secs. */
-
-/*
- * Arbitrary upper vmusr channel error count limit.
- */
-#define VMUSR_CHANNEL_ERR_MAX 15 /* approximately 15 secs. */
-
-#define CONFNAME_MAX_CHANNEL_ATTEMPTS "maxChannelAttempts"
-
#if defined(GLOBALCONFIG_SUPPORTED)
/*
* The state of the global conf module.
&state->ctx);
}
-
-/**
- * Return the RpcChannel failure threshold for the tools user service.
- *
- * @param[in] state The service state.
- *
- * @return The RpcChannel failure limit for the user tools service.
- */
-
-guint
-ToolsCore_GetVmusrLimit(ToolsServiceState *state) // IN
-{
- gint errorLimit = 0; /* Special value 0 means no error threshold. */
-
- if (TOOLS_IS_USER_SERVICE(state)) {
- errorLimit = VMTools_ConfigGetInteger(state->ctx.config,
- state->name,
- CONFNAME_MAX_CHANNEL_ATTEMPTS,
- VMUSR_CHANNEL_ERR_DEFAULT);
-
- /*
- * A zero value is allowed and will disable the single vmusr
- * process restriction.
- */
- if (errorLimit != 0 &&
- (errorLimit < VMUSR_CHANNEL_ERR_MIN ||
- errorLimit > VMUSR_CHANNEL_ERR_MAX)) {
- g_warning("%s: Invalid %s: %s (%d) specified in tools configuration; "
- "using default value (%d)\n", __FUNCTION__,
- state->name, CONFNAME_MAX_CHANNEL_ATTEMPTS,
- errorLimit, VMUSR_CHANNEL_ERR_DEFAULT);
- errorLimit = VMUSR_CHANNEL_ERR_DEFAULT;
- }
- }
-
- return errorLimit;
-}
-
-
/**
* Returns the name of the TCLO app name. This will only return non-NULL
* if the service is either the tools "guestd" or "userd" service.
#include "vmci_sockets.h"
#endif
+/*
+ * The number of RPC channel errors to reasonably indicate that the single allowed toolbox-dnd
+ * channel is currently in use by another process vmusr channel errors before quitting the vmusr
+ * process start-up. Value used to quit vmusr process at start-up
+ */
+#define VMUSR_CHANNEL_MAX_RPC_ERRS 5
/**
size_t i;
#if !defined(_WIN32)
-
/* For the *nix user service app. */
if (TOOLS_IS_USER_SERVICE(state)) {
failureCb = ToolsCoreAppChannelFail;
- errorLimit = ToolsCore_GetVmusrLimit(state);
+ errorLimit = VMUSR_CHANNEL_MAX_RPC_ERRS;
}
#endif