mirror of
https://github.com/adulau/ssldump.git
synced 2024-11-07 12:06:27 +00:00
Merge pull request #3 from wllm-rbnt/master
[bugfix] Initialize initial reference timeval
This commit is contained in:
commit
0c177776c2
2 changed files with 5 additions and 2 deletions
|
@ -91,8 +91,8 @@ int packet_cnt = 0; // Packet counter used for connection pool cleaning
|
||||||
int conn_freq = 100; // Number of packets after which a connection pool
|
int conn_freq = 100; // Number of packets after which a connection pool
|
||||||
// cleaning is performed
|
// cleaning is performed
|
||||||
int conn_ttl = 100; // TTL of inactive connections in connection pool
|
int conn_ttl = 100; // TTL of inactive connections in connection pool
|
||||||
struct timeval last_packet_seen_time; // Timestamp of the last packet of the
|
struct timeval last_packet_seen_time = // Timestamp of the last packet of the
|
||||||
// last block of conn_freq packets seen
|
(struct timeval) {0}; // last block of conn_freq packets seen
|
||||||
|
|
||||||
int err_exit(str,num)
|
int err_exit(str,num)
|
||||||
char *str;
|
char *str;
|
||||||
|
|
|
@ -172,6 +172,9 @@ int clean_old_conn() {
|
||||||
struct timeval dt;
|
struct timeval dt;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
|
if(!last_packet_seen_time.tv_sec)
|
||||||
|
return 0; // Still processing first block of packets
|
||||||
|
|
||||||
for(conn=first_conn;conn;conn=conn->next) {
|
for(conn=first_conn;conn;conn=conn->next) {
|
||||||
i++;
|
i++;
|
||||||
tcpconn = &conn->conn;
|
tcpconn = &conn->conn;
|
||||||
|
|
Loading…
Reference in a new issue