X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fwrite_http.c;h=3035e43a99611ec3daf9e3b5b99f2ec3a2d71316;hb=b4c8f3f762d666742c774ab3b45815e5a416e5da;hp=9cf9fe11fb9df4c033df7728ca2d44b92f143bb5;hpb=edd0e2639a241167e213ec301bfc71c7d291ee61;p=collectd.git diff --git a/src/write_http.c b/src/write_http.c index 9cf9fe11..3035e43a 100644 --- a/src/write_http.c +++ b/src/write_http.c @@ -111,6 +111,7 @@ static int wh_callback_init (wh_callback_t *cb) /* {{{ */ return (-1); } + curl_easy_setopt (cb->curl, CURLOPT_NOSIGNAL, 1); curl_easy_setopt (cb->curl, CURLOPT_USERAGENT, PACKAGE_NAME"/"PACKAGE_VERSION); headers = NULL; @@ -306,8 +307,10 @@ static int wh_write_command (const data_set_t *ds, const value_list_t *vl, /* {{ } command_len = (size_t) ssnprintf (command, sizeof (command), - "PUTVAL %s interval=%i %s\r\n", - key, vl->interval, values); + "PUTVAL %s interval=%.3f %s\r\n", + key, + CDTIME_T_TO_DOUBLE (vl->interval), + values); if (command_len >= sizeof (command)) { ERROR ("write_http plugin: Command buffer too small: " "Need %zu bytes.", command_len + 1);