projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39ea166
)
write_graphite: avoid printing out the NULL value in error messages
author
Wilfried Goesgens
<dothebart@citadel.org>
Tue, 17 Sep 2013 19:15:02 +0000
(21:15 +0200)
committer
Marc Fournier
<marc.fournier@camptocamp.com>
Sat, 21 Sep 2013 13:39:09 +0000
(15:39 +0200)
src/write_graphite.c
patch
|
blob
|
history
diff --git
a/src/write_graphite.c
b/src/write_graphite.c
index
667c11e
..
c3d6bf1
100644
(file)
--- a/
src/write_graphite.c
+++ b/
src/write_graphite.c
@@
-131,8
+131,10
@@
static int wg_send_buffer (struct wg_callback *cb)
if (cb->log_send_errors && status < 0)
{
char errbuf[1024];
+ const char *protocol = cb->protocol ? cb->protocol : WG_DEFAULT_PROTOCOL;
+
ERROR ("write_graphite plugin: send to %s:%s (%s) failed with status %zi (%s)",
- cb->node, cb->service,
cb->
protocol,
+ cb->node, cb->service, protocol,
status, sstrerror (errno, errbuf, sizeof (errbuf)));