projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b0de49
)
write_stackdriver plugin: Check "http_code" instead of "status".
author
Florian Forster
<octo@collectd.org>
Thu, 18 Oct 2018 13:50:19 +0000
(15:50 +0200)
committer
Florian Forster
<ff@octo.it>
Thu, 18 Oct 2018 16:52:13 +0000
(18:52 +0200)
src/write_stackdriver.c
patch
|
blob
|
history
diff --git
a/src/write_stackdriver.c
b/src/write_stackdriver.c
index
421df2d
..
0dad03c
100644
(file)
--- 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);
}