summaryrefslogtreecommitdiffstats
path: root/ripd/ripd.c
diff options
context:
space:
mode:
authorajs <ajs>2007-03-21 18:57:38 +0000
committerajs <ajs>2007-03-21 18:57:38 +0000
commitd7044bc6326d650cac62504427cfc5af7675b3ed (patch)
tree65ed3ff2ccb17aff02a0d29f69e9c86a6708129c /ripd/ripd.c
parent2afa1544a80c883d534701626c467c446353cf3b (diff)
downloadquagga-d7044bc6326d650cac62504427cfc5af7675b3ed.tar.bz2
quagga-d7044bc6326d650cac62504427cfc5af7675b3ed.tar.xz
[ripd] Fix "show ip rip status" display of time until next update
2007-03-21 Andrew J. Schorr <ajschorr@alumni.princeton.edu> * ripd.c: (show_ip_rip_status) Use new thread_timer_remain_second function instead of rip_next_thread_timer to display the time until next update properly. (rip_next_thread_timer) Remove obsolete function.
Diffstat (limited to 'ripd/ripd.c')
-rw-r--r--ripd/ripd.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/ripd/ripd.c b/ripd/ripd.c
index afa49fd6..f656073a 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -3500,17 +3500,6 @@ DEFUN (show_ip_rip,
return CMD_SUCCESS;
}
-/* Return next event time. */
-static int
-rip_next_thread_timer (struct thread *thread)
-{
- struct timeval timer_now;
-
- gettimeofday (&timer_now, NULL);
-
- return thread->u.sands.tv_sec - timer_now.tv_sec;
-}
-
/* Vincent: formerly, it was show_ip_protocols_rip: "show ip protocols" */
DEFUN (show_ip_rip_status,
show_ip_rip_status_cmd,
@@ -3533,8 +3522,8 @@ DEFUN (show_ip_rip_status,
vty_out (vty, "Routing Protocol is \"rip\"%s", VTY_NEWLINE);
vty_out (vty, " Sending updates every %ld seconds with +/-50%%,",
rip->update_time);
- vty_out (vty, " next due in %d seconds%s",
- rip_next_thread_timer (rip->t_update),
+ vty_out (vty, " next due in %lu seconds%s",
+ thread_timer_remain_second(rip->t_update),
VTY_NEWLINE);
vty_out (vty, " Timeout after %ld seconds,", rip->timeout_time);
vty_out (vty, " garbage collect after %ld seconds%s", rip->garbage_time,