diff --git a/src/bind.c b/src/bind.c
index 38d4a27f1ca29de115fe59dd6e119f5414e3914a..288949a802113ed0a8d3b049ae02a65bc1dd3344 100644 (file)
--- a/src/bind.c
+++ b/src/bind.c
};
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;
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) {
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 "
return (-1);
}
- curl_easy_setopt (curl, CURLOPT_NOSIGNAL, 1);
+ curl_easy_setopt (curl, CURLOPT_NOSIGNAL, 1L);
curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, bind_curl_callback);
curl_easy_setopt (curl, CURLOPT_USERAGENT, PACKAGE_NAME"/"PACKAGE_VERSION);
curl_easy_setopt (curl, CURLOPT_ERRORBUFFER, bind_curl_error);
curl_easy_setopt (curl, CURLOPT_URL, (url != NULL) ? url : BIND_DEFAULT_URL);
- curl_easy_setopt (curl, CURLOPT_FOLLOWLOCATION, 1);
+ curl_easy_setopt (curl, CURLOPT_FOLLOWLOCATION, 1L);
return (0);
} /* }}} int bind_init */