X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fbind.c;h=5b7d7a056efe7d1a693c34b6737a191b2dbab63c;hb=b850c79322880d2b1936bc8babaf42e3657d942b;hp=38d4a27f1ca29de115fe59dd6e119f5414e3914a;hpb=9e7b3a035836474cb4af253b248de30d5eb97f4d;p=collectd.git diff --git a/src/bind.c b/src/bind.c index 38d4a27f..5b7d7a05 100644 --- a/src/bind.c +++ b/src/bind.c @@ -98,6 +98,10 @@ struct list_info_ptr_s }; typedef struct list_info_ptr_s list_info_ptr_t; +/* FIXME: Enabled by default for backwards compatibility. */ +/* TODO: Remove time parsing code. */ +static _Bool config_parse_time = 1; + static char *url = NULL; static int global_opcodes = 1; static int global_qtypes = 1; @@ -249,7 +253,8 @@ static void submit (time_t ts, const char *plugin_instance, /* {{{ */ vl.values = values; vl.values_len = 1; - vl.time = TIME_T_TO_CDTIME_T (ts); + if (config_parse_time) + vl.time = TIME_T_TO_CDTIME_T (ts); sstrncpy(vl.host, hostname_g, sizeof(vl.host)); sstrncpy(vl.plugin, "bind", sizeof(vl.plugin)); if (plugin_instance) { @@ -1364,6 +1369,8 @@ static int bind_config (oconfig_item_t *ci) /* {{{ */ bind_config_set_bool ("MemoryStats", &global_memory_stats, child); else if (strcasecmp ("View", child->key) == 0) bind_config_add_view (child); + else if (strcasecmp ("ParseTime", child->key) == 0) + cf_util_get_boolean (child, &config_parse_time); else { WARNING ("bind plugin: Unknown configuration option "