projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fb16e34
)
ping plugin: Improved some error messages.
author
Sebastian Harl
<sh@tokkee.org>
Thu, 28 Jan 2010 22:29:25 +0000
(23:29 +0100)
committer
Sebastian Harl
<sh@tokkee.org>
Thu, 28 Jan 2010 22:29:25 +0000
(23:29 +0100)
src/ping.c
patch
|
blob
|
history
diff --git
a/src/ping.c
b/src/ping.c
index
de9c45b
..
5187e2b
100644
(file)
--- a/
src/ping.c
+++ b/
src/ping.c
@@
-160,7
+160,8
@@
static void *ping_thread (void *arg) /* {{{ */
int tmp_status;
tmp_status = ping_host_add (pingobj, hl->host);
if (tmp_status != 0)
int tmp_status;
tmp_status = ping_host_add (pingobj, hl->host);
if (tmp_status != 0)
- WARNING ("ping plugin: ping_host_add (%s) failed.", hl->host);
+ WARNING ("ping plugin: ping_host_add (%s) failed: %s",
+ hl->host, ping_get_error (pingobj));
else
status++;
}
else
status++;
}
@@
-190,7
+191,9
@@
static void *ping_thread (void *arg) /* {{{ */
if (gettimeofday (&tv_begin, NULL) < 0)
{
if (gettimeofday (&tv_begin, NULL) < 0)
{
- ERROR ("ping plugin: gettimeofday failed");
+ char errbuf[1024];
+ ERROR ("ping plugin: gettimeofday failed: %s",
+ sstrerror (errno, errbuf, sizeof (errbuf)));
ping_thread_error = 1;
break;
}
ping_thread_error = 1;
break;
}
@@
-265,7
+268,9
@@
static void *ping_thread (void *arg) /* {{{ */
if (gettimeofday (&tv_end, NULL) < 0)
{
if (gettimeofday (&tv_end, NULL) < 0)
{
- ERROR ("ping plugin: gettimeofday failed");
+ char errbuf[1024];
+ ERROR ("ping plugin: gettimeofday failed: %s",
+ sstrerror (errno, errbuf, sizeof (errbuf)));
ping_thread_error = 1;
break;
}
ping_thread_error = 1;
break;
}