From: Florian Forster Date: Thu, 18 Oct 2018 13:50:19 +0000 (+0200) Subject: write_stackdriver plugin: Check "http_code" instead of "status". X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=0fab9e80c1068399d1244053f563a93c1cd03acf;p=collectd.git write_stackdriver plugin: Check "http_code" instead of "status". --- diff --git a/src/write_stackdriver.c b/src/write_stackdriver.c index 421df2da..0dad03cf 100644 --- a/src/write_stackdriver.c +++ b/src/write_stackdriver.c @@ -236,10 +236,10 @@ static int do_post(wg_callback_t *cb, char const *url, void const *payload, curl_easy_getinfo(cb->curl, CURLINFO_RESPONSE_CODE, &http_code); if (ret_content != NULL) { - if ((status >= 400) && (status < 500)) { + if ((http_code >= 400) && (http_code < 500)) { ERROR("write_stackdriver plugin: POST %s: %s", url, API_ERROR_STRING(parse_api_error(ret_content->memory))); - } else if (status >= 500) { + } else if (http_code >= 500) { WARNING("write_stackdriver plugin: POST %s: %s", url, ret_content->memory); }