aboutsummaryrefslogtreecommitdiff
path: root/net/port-mirroring/patches/020-time.patch
blob: 63350fc9e0bf9a2a1b79f48bf4dc4e9357cb97ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- a/src/main.c
+++ b/src/main.c
@@ -252,7 +252,7 @@ void packet_handler_ex(const struct pcap
         if (handle == NULL || pcap_sendpacket(handle, pkt_data, header->len) != 0)
         {
             //error detected
-            long nowTime;
+            time_t nowTime;
             time(&nowTime);
             if (nowTime - cfg.init_time > ERRTIMEOUT && header->len < 1500)
             {
@@ -282,7 +282,7 @@ void packet_handler_ex(const struct pcap
             if (handle == NULL || pcap_sendpacket(handle, buf, header->len) != 0)
             {
                 //error detected
-                long nowTime;
+                time_t nowTime;
                 time(&nowTime);
                 if (nowTime - cfg.init_time > ERRTIMEOUT && header->len < 1500)
                 {