From: Florian Forster Date: Thu, 25 Feb 2010 22:55:25 +0000 (+0100) Subject: Merge branch 'collectd-4.8' into collectd-4.9 X-Git-Tag: collectd-4.9.2~9 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3bd6fcdfd20002eee1f1803460728449c0c98f86;p=collectd.git Merge branch 'collectd-4.8' into collectd-4.9 Conflicts: src/ping.c --- 3bd6fcdfd20002eee1f1803460728449c0c98f86 diff --cc src/ping.c index 5366b98f,5187e2b7..b536f429 --- a/src/ping.c +++ b/src/ping.c @@@ -181,18 -154,19 +181,19 @@@ static void *ping_thread (void *arg) / ping_setopt (pingobj, PING_OPT_TTL, (void *) &ping_ttl); /* Add all the hosts to the ping object. */ - status = 0; + count = 0; for (hl = hostlist_head; hl != NULL; hl = hl->next) { - int status; - status = ping_host_add (pingobj, hl->host); - if (status != 0) - WARNING ("ping plugin: ping_host_add (%s) failed.", hl->host); + int tmp_status; + tmp_status = ping_host_add (pingobj, hl->host); + if (tmp_status != 0) + WARNING ("ping plugin: ping_host_add (%s) failed: %s", + hl->host, ping_get_error (pingobj)); else - status++; + count++; } - if (status == 0) + if (count == 0) { ERROR ("ping plugin: No host could be added to ping object. Giving up."); ping_thread_error = 1; diff --cc src/plugin.c index 182892a9,c163ca7d..1eed532c --- a/src/plugin.c +++ b/src/plugin.c @@@ -331,9 -317,10 +338,10 @@@ static void *plugin_read_thread (void _ struct timeval now; int status; int rf_type; + int rc; /* Get the read function that needs to be read next. */ - rf = c_head_get_root (read_heap); + rf = c_heap_get_root (read_heap); if (rf == NULL) { struct timespec abstime;