aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/accounting.c
diff options
context:
space:
mode:
authorPer Ekman <pek@kth.se>2011-09-12 19:14:30 (GMT)
committerJouni Malinen <j@w1.fi>2011-09-12 19:14:30 (GMT)
commit3d9e2e6615438959c9508f64d5148e06320b4827 (patch)
treeef6c422caec5d33fd920e1a585614f63c0a96bc4 /src/ap/accounting.c
parent531f0331a12fee6e7a08654071b1287a135a068b (diff)
downloadhostap-3d9e2e6615438959c9508f64d5148e06320b4827.zip
hostap-3d9e2e6615438959c9508f64d5148e06320b4827.tar.gz
hostap-3d9e2e6615438959c9508f64d5148e06320b4827.tar.bz2
Remove references to time_t/time()
Use os_time() in AP mode instead of direct time() calls.
Diffstat (limited to 'src/ap/accounting.c')
-rw-r--r--src/ap/accounting.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ap/accounting.c b/src/ap/accounting.c
index dbfb058..03421b3 100644
--- a/src/ap/accounting.c
+++ b/src/ap/accounting.c
@@ -236,6 +236,7 @@ static void accounting_interim_update(void *eloop_ctx, void *timeout_ctx)
void accounting_sta_start(struct hostapd_data *hapd, struct sta_info *sta)
{
struct radius_msg *msg;
+ struct os_time t;
int interval;
if (sta->acct_session_started)
@@ -247,7 +248,8 @@ void accounting_sta_start(struct hostapd_data *hapd, struct sta_info *sta)
"starting accounting session %08X-%08X",
sta->acct_session_id_hi, sta->acct_session_id_lo);
- time(&sta->acct_session_start);
+ os_get_time(&t);
+ sta->acct_session_start = t.sec;
sta->last_rx_bytes = sta->last_tx_bytes = 0;
sta->acct_input_gigawords = sta->acct_output_gigawords = 0;
hostapd_drv_sta_clear_stats(hapd, sta->addr);