X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fbind.c;h=03dfcc77cd7bf322b7576fe288f0bbb3c6e14191;hb=b61a03b05c1f4040a6599334b65141aa3bd134f5;hp=288949a802113ed0a8d3b049ae02a65bc1dd3344;hpb=c7b0f0b0267f2ab7c84eea8306f0a516f5b8f769;p=collectd.git diff --git a/src/bind.c b/src/bind.c index 288949a8..03dfcc77 100644 --- a/src/bind.c +++ b/src/bind.c @@ -266,7 +266,7 @@ static void submit (time_t ts, const char *plugin_instance, /* {{{ */ 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 */ @@ -1399,6 +1399,7 @@ static int bind_init (void) /* {{{ */ 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, 1L); + curl_easy_setopt (curl, CURLOPT_MAXREDIRS, 50L); return (0); } /* }}} int bind_init */ @@ -1414,7 +1415,7 @@ static int bind_read (void) /* {{{ */ } bind_buffer_fill = 0; - if (curl_easy_perform (curl) != 0) + if (curl_easy_perform (curl) != CURLE_OK) { ERROR ("bind plugin: curl_easy_perform failed: %s", bind_curl_error);