Signed-off-by: Sven Eckelmann sven.eckelmann@gmx.de --- This patch is useless if we also add "batctl: Readd ping interval after each loop"
batctl/ping.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/batctl/ping.c b/batctl/ping.c index 288bd01..1ed8fac 100644 --- a/batctl/ping.c +++ b/batctl/ping.c @@ -180,6 +180,9 @@ int ping(char *mesh_iface, int argc, char **argv) packet_len, packet_len + 28);
while (!is_aborted) { + tv.tv_sec = timeout; + tv.tv_usec = 0; + if (loop_count == 0) break;
@@ -195,9 +198,6 @@ int ping(char *mesh_iface, int argc, char **argv)
start_timer();
- tv.tv_sec = timeout; - tv.tv_usec = 0; - FD_ZERO(&read_socket); FD_SET(ping_fd, &read_socket);