forked from Mirror/frr
bgpd: Drop timestamp_string()
Replace with time_to_string(). Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
b37f5f53b3
commit
3784736b09
|
@ -766,8 +766,7 @@ static int update_group_show_walkcb(struct update_group *updgrp, void *arg)
|
||||||
safi2str(updgrp->safi));
|
safi2str(updgrp->safi));
|
||||||
} else {
|
} else {
|
||||||
vty_out(vty, "Update-group %" PRIu64 ":\n", updgrp->id);
|
vty_out(vty, "Update-group %" PRIu64 ":\n", updgrp->id);
|
||||||
vty_out(vty, " Created: %s",
|
vty_out(vty, " Created: %s", time_to_string(updgrp->uptime, timebuf));
|
||||||
timestamp_string(updgrp->uptime, timebuf));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
filter = &updgrp->conf->filter[updgrp->afi][updgrp->safi];
|
filter = &updgrp->conf->filter[updgrp->afi][updgrp->safi];
|
||||||
|
@ -842,8 +841,7 @@ static int update_group_show_walkcb(struct update_group *updgrp, void *arg)
|
||||||
vty_out(vty, "\n");
|
vty_out(vty, "\n");
|
||||||
vty_out(vty, " Update-subgroup %" PRIu64 ":\n",
|
vty_out(vty, " Update-subgroup %" PRIu64 ":\n",
|
||||||
subgrp->id);
|
subgrp->id);
|
||||||
vty_out(vty, " Created: %s",
|
vty_out(vty, " Created: %s", time_to_string(subgrp->uptime, timebuf));
|
||||||
timestamp_string(subgrp->uptime, timebuf));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (subgrp->split_from.update_group_id
|
if (subgrp->split_from.update_group_id
|
||||||
|
|
|
@ -2711,14 +2711,6 @@ static inline int peer_group_af_configured(struct peer_group *group)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline char *timestamp_string(time_t ts, char *timebuf)
|
|
||||||
{
|
|
||||||
time_t tbuf;
|
|
||||||
|
|
||||||
tbuf = time(NULL) - (monotime(NULL) - ts);
|
|
||||||
return ctime_r(&tbuf, timebuf);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline bool peer_established(struct peer_connection *connection)
|
static inline bool peer_established(struct peer_connection *connection)
|
||||||
{
|
{
|
||||||
return connection->status == Established;
|
return connection->status == Established;
|
||||||
|
|
Loading…
Reference in a new issue