X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fconfigfile.c;h=0e54f267f9fdd08c15d4d4d11a427f409d708723;hb=c97eef40cf19b106e6a00006a3b8f3f9ee409045;hp=d6c224fd74966e23f6758ee79be11b75a67e5960;hpb=10b92353ea2ccf66eabad273799c36225d2efc3f;p=collectd.git diff --git a/src/configfile.c b/src/configfile.c index d6c224fd..0e54f267 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -109,6 +109,8 @@ static cf_global_option_t cf_global_options[] = {"Interval", NULL, NULL}, {"ReadThreads", NULL, "5"}, {"WriteThreads", NULL, "5"}, + {"WriteQueueLimitHigh", NULL, NULL}, + {"WriteQueueLimitLow", NULL, NULL}, {"Timeout", NULL, "2"}, {"AutoLoadPlugin", NULL, "false"}, {"PreCacheChain", NULL, "PreCache"}, @@ -915,6 +917,23 @@ const char *global_option_get (const char *option) : cf_global_options[i].def); } /* char *global_option_get */ +long global_option_get_long (const char *option, long default_value) +{ + const char *str; + long value; + + str = global_option_get (option); + if (NULL == str) + return (default_value); + + errno = 0; + value = strtol (str, /* endptr = */ NULL, /* base = */ 0); + if (errno != 0) + return (default_value); + + return (value); +} /* char *global_option_get_long */ + cdtime_t cf_get_default_interval (void) { char const *str = global_option_get ("Interval");