Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
2.0.0
-
None
-
reproduced on RHE and Ubunte
Description
connection_timeout parameter is defined as
"To enable them, define the timeout in seconds in the service's configuration section."
But the setter use function config_truth_value() to check the parameter, but
config_truth_value returns an error("Not a boolean value"), if the value is unequal 0 or 1.
serviceSetTimeout(service, config_truth_value(connection_timeout));
config_truth_value(char *str)
{
if (strcasecmp(str, "true") == 0 || strcasecmp(str, "on") == 0 ||
strcasecmp(str, "yes") == 0 || strcasecmp(str, "1") == 0)
if (strcasecmp(str, "false") == 0 || strcasecmp(str, "off") == 0 ||
strcasecmp(str, "no") == 0 || strcasecmp(str, "0") == 0)
MXS_ERROR("Not a boolean value: %s", str);
return -1;
To reproduce:
add
connection_timeout=3600
to a services configuration.
Suggested fix:
remove function config_truth_value
serviceSetTimeout(service, connection_timeout);