Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Replace long with time_t #73

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ void packet_handler_ex(const struct pcap_pkthdr* header, const u_char* pkt_data,
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)
{
Expand Down Expand Up @@ -282,7 +282,7 @@ void packet_handler_ex(const struct pcap_pkthdr* header, const u_char* pkt_data,
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)
{
Expand Down