Changed all atoi calls to config_truth_value when they were used to generate boolean values.
This commit is contained in:
@ -1308,7 +1308,7 @@ int i;
|
|||||||
}
|
}
|
||||||
else if (strcmp(name, "ms_timestamp") == 0)
|
else if (strcmp(name, "ms_timestamp") == 0)
|
||||||
{
|
{
|
||||||
skygw_set_highp(atoi(value));
|
skygw_set_highp(config_truth_value(value));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1316,7 +1316,7 @@ int i;
|
|||||||
{
|
{
|
||||||
if (strcasecmp(name, lognames[i].logname) == 0)
|
if (strcasecmp(name, lognames[i].logname) == 0)
|
||||||
{
|
{
|
||||||
if (atoi(value))
|
if (config_truth_value(value))
|
||||||
skygw_log_enable(lognames[i].logfile);
|
skygw_log_enable(lognames[i].logfile);
|
||||||
else
|
else
|
||||||
skygw_log_disable(lognames[i].logfile);
|
skygw_log_disable(lognames[i].logfile);
|
||||||
@ -1495,10 +1495,10 @@ SERVER *server;
|
|||||||
user,
|
user,
|
||||||
auth);
|
auth);
|
||||||
if (enable_root_user)
|
if (enable_root_user)
|
||||||
serviceEnableRootUser(service, atoi(enable_root_user));
|
serviceEnableRootUser(service, config_truth_value(enable_root_user));
|
||||||
|
|
||||||
if (connection_timeout)
|
if (connection_timeout)
|
||||||
serviceSetTimeout(service, atoi(connection_timeout));
|
serviceSetTimeout(service, config_truth_value(connection_timeout));
|
||||||
|
|
||||||
|
|
||||||
if(auth_all_servers)
|
if(auth_all_servers)
|
||||||
@ -1511,7 +1511,7 @@ SERVER *server;
|
|||||||
if (allow_localhost_match_wildcard_host)
|
if (allow_localhost_match_wildcard_host)
|
||||||
serviceEnableLocalhostMatchWildcardHost(
|
serviceEnableLocalhostMatchWildcardHost(
|
||||||
service,
|
service,
|
||||||
atoi(allow_localhost_match_wildcard_host));
|
config_truth_value(allow_localhost_match_wildcard_host));
|
||||||
|
|
||||||
/** Read, validate and set max_slave_connections */
|
/** Read, validate and set max_slave_connections */
|
||||||
max_slave_conn_str =
|
max_slave_conn_str =
|
||||||
@ -1651,7 +1651,7 @@ SERVER *server;
|
|||||||
user,
|
user,
|
||||||
auth);
|
auth);
|
||||||
if (enable_root_user)
|
if (enable_root_user)
|
||||||
serviceEnableRootUser(obj->element, atoi(enable_root_user));
|
serviceEnableRootUser(obj->element, config_truth_value(enable_root_user));
|
||||||
|
|
||||||
if (connection_timeout)
|
if (connection_timeout)
|
||||||
serviceSetTimeout(obj->element, atoi(connection_timeout));
|
serviceSetTimeout(obj->element, atoi(connection_timeout));
|
||||||
@ -1659,7 +1659,7 @@ SERVER *server;
|
|||||||
if (allow_localhost_match_wildcard_host)
|
if (allow_localhost_match_wildcard_host)
|
||||||
serviceEnableLocalhostMatchWildcardHost(
|
serviceEnableLocalhostMatchWildcardHost(
|
||||||
obj->element,
|
obj->element,
|
||||||
atoi(allow_localhost_match_wildcard_host));
|
config_truth_value(allow_localhost_match_wildcard_host));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ static FILTER_OBJECT MyObject = {
|
|||||||
* are logged.
|
* are logged.
|
||||||
*
|
*
|
||||||
* To this base a session number is attached such that each session will
|
* To this base a session number is attached such that each session will
|
||||||
* have a nique name.
|
* have a unique name.
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int sessions; /* The count of sessions */
|
int sessions; /* The count of sessions */
|
||||||
|
@ -41,10 +41,10 @@ extern __thread log_info_t tls_log_info;
|
|||||||
* Two optional parameters that define the behavior after a data modifying query
|
* Two optional parameters that define the behavior after a data modifying query
|
||||||
* is executed:
|
* is executed:
|
||||||
*
|
*
|
||||||
* count=<number of queries> Queries to route to master after data modification.
|
* count=<number of queries> Queries to route to master after data modification.
|
||||||
* time=<time period> Seconds to wait before queries are routed to slaves.
|
* time=<time period> Seconds to wait before queries are routed to slaves.
|
||||||
* match=<regex> Regex for matching
|
* match=<regex> Regex for matching
|
||||||
* ignore=<regex> Regex for ignoring
|
* ignore=<regex> Regex for ignoring
|
||||||
*
|
*
|
||||||
* The filter also has two options: @c case, which makes the regex case-sensitive, and @c ignorecase, which does the opposite.
|
* The filter also has two options: @c case, which makes the regex case-sensitive, and @c ignorecase, which does the opposite.
|
||||||
* Date Who Description
|
* Date Who Description
|
||||||
|
Reference in New Issue
Block a user