aboutsummaryrefslogtreecommitdiffstats
path: root/pingu_burst.c
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-07-07 16:32:53 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2011-07-07 16:32:53 +0200
commit6d87138ea7513761ae864e65dbf03d7f614aeb5d (patch)
tree31c9d29418c2114fc278cbaf3f0d7a44efc7065e /pingu_burst.c
parent322e0f8d26edc121cbeee1b467b0009d75614f99 (diff)
downloadpingu-6d87138ea7513761ae864e65dbf03d7f614aeb5d.tar.bz2
pingu-6d87138ea7513761ae864e65dbf03d7f614aeb5d.tar.xz
pingu: fix misc bugs
fix some segfaults and some logic bugs
Diffstat (limited to 'pingu_burst.c')
-rw-r--r--pingu_burst.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pingu_burst.c b/pingu_burst.c
index f86249a..7cc5b9a 100644
--- a/pingu_burst.c
+++ b/pingu_burst.c
@@ -32,7 +32,7 @@ void ping_burst_start(struct ev_loop *loop, struct pingu_host *host)
for (rp = ai; rp != NULL; rp = rp->ai_next) {
host->burst.saddr = *ai->ai_addr;
r = pingu_ping_send(loop, host);
- if (r >= 0)
+ if (r == 0)
break;
}
@@ -47,7 +47,7 @@ void pingu_burst_timeout_cb(struct ev_loop *loop, struct ev_timer *w,
struct pingu_host *host = container_of(w, struct pingu_host, burst_timeout_watcher);
if (host->burst.active) {
- log_warning("%s: burst already active");
+ log_warning("%s: burst already active", host->host);
return;
}
log_debug("%s: new burst", host->host);