diff options
Diffstat (limited to 'eperd/ping.c')
-rw-r--r-- | eperd/ping.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/eperd/ping.c b/eperd/ping.c index 31d75c1..bf51019 100644 --- a/eperd/ping.c +++ b/eperd/ping.c @@ -548,9 +548,6 @@ static void ping_xmit(struct pingstate *host) if (host->base->done) host->base->done(host); - /* Fake packet sent to kill timer */ - host->sentpkts++; - return; } @@ -631,6 +628,10 @@ static void ping_xmit(struct pingstate *host) errno, 0, NULL, host); } + + + /* Add the timer to handle no reply condition in the given timeout */ + evtimer_add(&host->ping_timer, &host->base->tv_interval); } @@ -652,11 +653,6 @@ static void noreply_callback(int __attribute((unused)) unused, const short __att } ping_xmit(host); - - if (host->sentpkts <= host->maxpkts) - { - evtimer_add(&host->ping_timer, &host->base->tv_interval); - } } /* @@ -1140,9 +1136,6 @@ static void ping_start2(void *state) pingstate->cursize= pingstate->maxsize; ping_xmit(pingstate); - - /* Add the timer to handle no reply condition in the given timeout */ - evtimer_add(&pingstate->ping_timer, &pingstate->base->tv_interval); } static void dns_cb(int result, struct evutil_addrinfo *res, void *ctx) |