mirror of
https://github.com/emanuele-f/PCAPdroid.git
synced 2026-07-03 21:21:12 +08:00
Fix idle check in root mode
This commit is contained in:
parent
5b50e3e8a1
commit
76daeaa849
@ -285,6 +285,7 @@ static void purge_expired_connections(vpnproxy_data_t *proxy, pcap_conn_t **conn
|
||||
log_d("IDLE (type=%d)", conn->tuple.ipproto);
|
||||
|
||||
// Will free the data in sendConnectionsDump
|
||||
conn->data->update_type = CONN_UPDATE_STATS;
|
||||
notify_connection(&proxy->conns_updates, &conn->tuple, conn->data);
|
||||
|
||||
conn->data->status = CONN_STATUS_CLOSED;
|
||||
|
||||
@ -899,7 +899,7 @@ void refresh_time(vpnproxy_data_t *proxy) {
|
||||
struct timeval now_tv;
|
||||
|
||||
gettimeofday(&now_tv, NULL);
|
||||
proxy->now_ms = now_tv.tv_sec * 1000 + now_tv.tv_usec / 1000;
|
||||
proxy->now_ms = (uint64_t)now_tv.tv_sec * 1000 + now_tv.tv_usec / 1000;
|
||||
}
|
||||
|
||||
/* ******************************************************* */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user