From 2176b7c3d248b16b63857582967eecfa4765dcc8 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Thu, 28 Jul 2016 17:23:39 +0200 Subject: [PATCH] zebra: use quagga_monotime() for zserv and rnh quagga_time() will disappear with the next commit, this is the last remaining user of it. Signed-off-by: Christian Franke Signed-off-by: David Lamparter --- zebra/zebra_rnh.c | 2 +- zebra/zserv.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c index 8b76ea65c9..03ae466997 100644 --- a/zebra/zebra_rnh.c +++ b/zebra/zebra_rnh.c @@ -921,7 +921,7 @@ send_client (struct rnh *rnh, struct zserv *client, rnh_type_t type, vrf_id_t vr } stream_putw_at (s, 0, stream_get_endp (s)); - client->nh_last_upd_time = quagga_time(NULL); + client->nh_last_upd_time = quagga_monotime(); client->last_write_cmd = cmd; return zebra_server_send_message(client); } diff --git a/zebra/zserv.c b/zebra/zserv.c index 886cd1b395..b36f8fe425 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -97,7 +97,7 @@ zserv_flush_data(struct thread *thread) break; } - client->last_write_time = quagga_time(NULL); + client->last_write_time = quagga_monotime(); return 0; } @@ -131,7 +131,7 @@ zebra_server_send_message(struct zserv *client) break; } - client->last_write_time = quagga_time(NULL); + client->last_write_time = quagga_monotime(); return 0; } @@ -864,7 +864,7 @@ zserv_rnh_register (struct zserv *client, int sock, u_short length, s = client->ibuf; - client->nh_reg_time = quagga_time(NULL); + client->nh_reg_time = quagga_monotime(); while (l < length) { @@ -952,7 +952,7 @@ zserv_rnh_unregister (struct zserv *client, int sock, u_short length, rnh = zebra_lookup_rnh(&p, zvrf->vrf_id, type); if (rnh) { - client->nh_dereg_time = quagga_time(NULL); + client->nh_dereg_time = quagga_monotime(); zebra_remove_rnh_client(rnh, client, type); } } @@ -1889,7 +1889,7 @@ zebra_client_create (int sock) /* Set table number. */ client->rtm_table = zebrad.rtm_table_default; - client->connect_time = quagga_time(NULL); + client->connect_time = quagga_monotime(); /* Initialize flags */ for (afi = AFI_IP; afi < AFI_MAX; afi++) for (i = 0; i < ZEBRA_ROUTE_MAX; i++) @@ -2015,7 +2015,7 @@ zebra_client_read (struct thread *thread) zlog_debug ("zebra message received [%s] %d in VRF %u", zserv_command_string (command), length, vrf_id); - client->last_read_time = quagga_time(NULL); + client->last_read_time = quagga_monotime(); client->last_read_cmd = command; zvrf = zebra_vrf_lookup (vrf_id); @@ -2325,7 +2325,7 @@ zserv_time_buf(time_t *time1, char *buf, int buflen) return (buf); } - now = quagga_time(NULL); + now = quagga_monotime(); now -= *time1; tm = gmtime(&now); -- 2.39.5