store the time a client connected.

This commit is contained in:
Nikos Mavrogiannopoulos
2014-01-05 17:17:54 +01:00
parent f6e7341fe1
commit 0981efe74f
2 changed files with 3 additions and 0 deletions

View File

@@ -936,6 +936,7 @@ fork_failed:
ctmp->remote_addr_len = ws.remote_addr_len;
ctmp->pid = pid;
ctmp->conn_time = time(0);
ctmp->fd = cmd_fd[0];
set_cloexec_flag (cmd_fd[0], 1);

View File

@@ -77,6 +77,8 @@ struct proc_st {
pid_t pid;
time_t udp_fd_receive_time; /* when the corresponding process has received a UDP fd */
time_t conn_time; /* the time the user connected */
/* the tun lease this process has */
struct tun_lease_st tun_lease;
struct ip_lease_st *ipv4;