projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #427 from kbingham/version_fix
[collectd.git]
/
src
/
write_graphite.c
diff --git
a/src/write_graphite.c
b/src/write_graphite.c
index
e49970c
..
c17b7f3
100644
(file)
--- a/
src/write_graphite.c
+++ b/
src/write_graphite.c
@@
-67,7
+67,7
@@
#endif
#ifndef WG_DEFAULT_PROTOCOL
#endif
#ifndef WG_DEFAULT_PROTOCOL
-# define WG_DEFAULT_PROTOCOL "
ud
p"
+# define WG_DEFAULT_PROTOCOL "
tc
p"
#endif
#ifndef WG_DEFAULT_LOG_SEND_ERRORS
#endif
#ifndef WG_DEFAULT_LOG_SEND_ERRORS
@@
-130,11
+130,13
@@
static int wg_send_buffer (struct wg_callback *cb)
status = swrite (cb->sock_fd, cb->send_buf, strlen (cb->send_buf));
if (status < 0)
{
status = swrite (cb->sock_fd, cb->send_buf, strlen (cb->send_buf));
if (status < 0)
{
+ const char *protocol = cb->protocol ? cb->protocol : WG_DEFAULT_PROTOCOL;
+
if (cb->log_send_errors)
{
char errbuf[1024];
ERROR ("write_graphite plugin: send to %s:%s (%s) failed with status %zi (%s)",
if (cb->log_send_errors)
{
char errbuf[1024];
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)));
}
status, sstrerror (errno, errbuf, sizeof (errbuf)));
}