mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 14:17:20 +00:00
Fix the display of some timers. (show ipv6 ripng and show ipv6 ripng status)
This commit is contained in:
parent
a1fdf94796
commit
6dfa827b7b
@ -1,3 +1,9 @@
|
|||||||
|
2007-04-12 Emmanuel Vize <emmanuel.vize@6wind.com>
|
||||||
|
|
||||||
|
* ripngd.c: (ripng_vty_out_uptime and show_ipv6_ripng_status)
|
||||||
|
Use new thread_timer_remain_second to display properly the timers
|
||||||
|
(reported patch from Andrew J. Schorr in ripd.c)
|
||||||
|
|
||||||
2006-05-11 Paul Jakma <paul.jakma@sun.com>
|
2006-05-11 Paul Jakma <paul.jakma@sun.com>
|
||||||
|
|
||||||
* ripng_interface.c: (ripng_interface_address_add) Remove
|
* ripng_interface.c: (ripng_interface_address_add) Remove
|
||||||
|
@ -1938,14 +1938,14 @@ ripng_vty_out_uptime (struct vty *vty, struct ripng_info *rinfo)
|
|||||||
|
|
||||||
if ((thread = rinfo->t_timeout) != NULL)
|
if ((thread = rinfo->t_timeout) != NULL)
|
||||||
{
|
{
|
||||||
clock = thread->u.sands.tv_sec - timer_now.tv_sec;
|
clock = thread_timer_remain_second (thread);
|
||||||
tm = gmtime (&clock);
|
tm = gmtime (&clock);
|
||||||
strftime (timebuf, TIME_BUF, "%M:%S", tm);
|
strftime (timebuf, TIME_BUF, "%M:%S", tm);
|
||||||
vty_out (vty, "%5s", timebuf);
|
vty_out (vty, "%5s", timebuf);
|
||||||
}
|
}
|
||||||
else if ((thread = rinfo->t_garbage_collect) != NULL)
|
else if ((thread = rinfo->t_garbage_collect) != NULL)
|
||||||
{
|
{
|
||||||
clock = thread->u.sands.tv_sec - timer_now.tv_sec;
|
clock = thread_timer_remain_second (thread);
|
||||||
tm = gmtime (&clock);
|
tm = gmtime (&clock);
|
||||||
strftime (timebuf, TIME_BUF, "%M:%S", tm);
|
strftime (timebuf, TIME_BUF, "%M:%S", tm);
|
||||||
vty_out (vty, "%5s", timebuf);
|
vty_out (vty, "%5s", timebuf);
|
||||||
@ -2095,17 +2095,6 @@ DEFUN (show_ipv6_ripng,
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return next event time. */
|
|
||||||
static int
|
|
||||||
ripng_next_thread_timer (struct thread *thread)
|
|
||||||
{
|
|
||||||
struct timeval timer_now;
|
|
||||||
|
|
||||||
gettimeofday (&timer_now, NULL);
|
|
||||||
|
|
||||||
return thread->u.sands.tv_sec - timer_now.tv_sec;
|
|
||||||
}
|
|
||||||
|
|
||||||
DEFUN (show_ipv6_ripng_status,
|
DEFUN (show_ipv6_ripng_status,
|
||||||
show_ipv6_ripng_status_cmd,
|
show_ipv6_ripng_status_cmd,
|
||||||
"show ipv6 ripng status",
|
"show ipv6 ripng status",
|
||||||
@ -2125,8 +2114,8 @@ DEFUN (show_ipv6_ripng_status,
|
|||||||
vty_out (vty, "Routing Protocol is \"RIPng\"%s", VTY_NEWLINE);
|
vty_out (vty, "Routing Protocol is \"RIPng\"%s", VTY_NEWLINE);
|
||||||
vty_out (vty, " Sending updates every %ld seconds with +/-50%%,",
|
vty_out (vty, " Sending updates every %ld seconds with +/-50%%,",
|
||||||
ripng->update_time);
|
ripng->update_time);
|
||||||
vty_out (vty, " next due in %d seconds%s",
|
vty_out (vty, " next due in %lu seconds%s",
|
||||||
ripng_next_thread_timer (ripng->t_update),
|
thread_timer_remain_second (ripng->t_update),
|
||||||
VTY_NEWLINE);
|
VTY_NEWLINE);
|
||||||
vty_out (vty, " Timeout after %ld seconds,", ripng->timeout_time);
|
vty_out (vty, " Timeout after %ld seconds,", ripng->timeout_time);
|
||||||
vty_out (vty, " garbage collect after %ld seconds%s", ripng->garbage_time,
|
vty_out (vty, " garbage collect after %ld seconds%s", ripng->garbage_time,
|
||||||
|
Loading…
Reference in New Issue
Block a user