Added "yes" and "no" to the config truth value check and added the function to the header.

This commit is contained in:
Markus Makela
2015-02-18 11:45:01 +02:00
parent da029140cd
commit 03456b931b
3 changed files with 6 additions and 5 deletions

View File

@ -1810,11 +1810,11 @@ bool config_set_qualified_param(
static int
config_truth_value(char *str)
{
if (strcasecmp(str, "true") == 0 || strcasecmp(str, "on") == 0)
if (strcasecmp(str, "true") == 0 || strcasecmp(str, "on") == 0 || strcasecmp(str, "yes") == 0)
{
return 1;
}
if (strcasecmp(str, "false") == 0 || strcasecmp(str, "off") == 0)
if (strcasecmp(str, "false") == 0 || strcasecmp(str, "off") == 0 || strcasecmp(str, "no") == 0)
{
return 0;
}