From 0fab9e80c1068399d1244053f563a93c1cd03acf Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 18 Oct 2018 15:50:19 +0200 Subject: [PATCH] write_stackdriver plugin: Check "http_code" instead of "status". --- src/write_stackdriver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.11.0