diff --git a/src/bind.c b/src/bind.c
index 1108a3a6cba3a50ed75d60bb775c0d0d798fe923..9fb3ec49e75ddda0756a4db1767bbec1e10a757b 100644 (file)
--- a/src/bind.c
+++ b/src/bind.c
if (type_instance) {
sstrncpy(vl.type_instance, type_instance,
sizeof(vl.type_instance));
- replace_special (vl.plugin_instance, sizeof (vl.plugin_instance));
+ replace_special (vl.type_instance, sizeof (vl.type_instance));
}
plugin_dispatch_values(&vl);
} /* }}} void submit */
xmlFree (zone_name);
zone_name = NULL;
- if (j >= views->zones_num)
+ if (j >= view->zones_num)
return (0);
zone_name = view->zones[j];
if (tmp->name == NULL)
{
ERROR ("bind plugin: strdup failed.");
- free (tmp);
+ sfree (views);
return (-1);
}
curl_easy_setopt (curl, CURLOPT_URL, (url != NULL) ? url : BIND_DEFAULT_URL);
curl_easy_setopt (curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt (curl, CURLOPT_MAXREDIRS, 50L);
+#ifdef HAVE_CURLOPT_TIMEOUT_MS
curl_easy_setopt (curl, CURLOPT_TIMEOUT_MS, (timeout >= 0) ?
- (long) timeout : CDTIME_T_TO_MS(plugin_get_interval()));
+ (long) timeout : (long) CDTIME_T_TO_MS(plugin_get_interval()));
+#endif
return (0);