[5/6] batctl: Readd ping interval after each loop

Message ID 1288450858-14753-5-git-send-email-sven.eckelmann@gmx.de (mailing list archive)
State Accepted, archived
Headers

Commit Message

Sven Eckelmann Oct. 30, 2010, 3 p.m. UTC
  The option -i for ping had no visible effect. We can simply change it
back to the old behaviour from battool times.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
---
 batctl/ping.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
  

Patch

diff --git a/batctl/ping.c b/batctl/ping.c
index 1ed8fac..9963b24 100644
--- a/batctl/ping.c
+++ b/batctl/ping.c
@@ -292,9 +292,8 @@  int ping(char *mesh_iface, int argc, char **argv)
 		}
 
 sleep:
-		if ((tv.tv_sec != 0) || (tv.tv_usec != 0))
-			select(0, NULL, NULL, NULL, &tv);
-
+		if (loop_interval > 0)
+			sleep(loop_interval);
 	}
 
 	if (packets_out == 0)