[core] recognize "enabled"/"disabled" for bool
(in addition to "enable" and "disable")
@@ -45,10 +45,12 @@ int config_plugin_value_tobool (const data_unset *du, int default_value)
if (du->type == TYPE_STRING) {
const buffer *b = &((const data_string *)du)->value;
if (buffer_eq_icase_slen(b, CONST_STR_LEN("enable"))
+ || buffer_eq_icase_slen(b, CONST_STR_LEN("enabled"))
|| buffer_eq_icase_slen(b, CONST_STR_LEN("true"))
|| buffer_eq_icase_slen(b, CONST_STR_LEN("1")))
return 1;
else if (buffer_eq_icase_slen(b, CONST_STR_LEN("disable"))
+ || buffer_eq_icase_slen(b, CONST_STR_LEN("disabled"))
|| buffer_eq_icase_slen(b, CONST_STR_LEN("false"))
|| buffer_eq_icase_slen(b, CONST_STR_LEN("0")))
return 0;
