summaryrefslogtreecommitdiff
path: root/accel-pppd/extra
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-10-03 21:59:07 +0400
committerDmitry Kozlov <xeb@mail.ru>2014-10-03 21:59:07 +0400
commit9994d48250e3805565f709d39ea0de4877436c6c (patch)
tree23ef90295715bb672a80da7fb1c7f9614cb2375e /accel-pppd/extra
parent8a7290359a446ce04c468b2a598ca75a6e2a9611 (diff)
downloadaccel-ppp-9994d48250e3805565f709d39ea0de4877436c6c.tar.gz
accel-ppp-9994d48250e3805565f709d39ea0de4877436c6c.zip
get rid of time(), use clock_gettime(CLOCK_MONOTONIC) instead
Diffstat (limited to 'accel-pppd/extra')
-rw-r--r--accel-pppd/extra/net-snmp/sessionTable_data_access.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/accel-pppd/extra/net-snmp/sessionTable_data_access.c b/accel-pppd/extra/net-snmp/sessionTable_data_access.c
index 5eb0dd3..ac7e94a 100644
--- a/accel-pppd/extra/net-snmp/sessionTable_data_access.c
+++ b/accel-pppd/extra/net-snmp/sessionTable_data_access.c
@@ -199,9 +199,6 @@ sessionTable_container_load(netsnmp_container *container)
sessionTable_rowreq_ctx *rowreq_ctx;
size_t count = 0;
struct ap_session *ses;
- time_t t;
-
- time(&t);
DEBUGMSGTL(("verbose:sessionTable:sessionTable_container_load","called\n"));
@@ -232,7 +229,7 @@ sessionTable_container_load(netsnmp_container *container)
rowreq_ctx->data->peer_addr = ses->ipv4 ? ses->ipv4->peer_addr : 0;
rowreq_ctx->data->type = ses->ctrl->type;
rowreq_ctx->data->state = ses->state;
- rowreq_ctx->data->uptime = (ses->stop_time ? ses->stop_time : t) - ses->start_time;
+ rowreq_ctx->data->uptime = (ses->stop_time ? ses->stop_time : _time()) - ses->start_time;
rowreq_ctx->data->calling_sid = _strdup(ses->ctrl->calling_station_id);
rowreq_ctx->data->called_sid = _strdup(ses->ctrl->called_station_id);