dect
/
libpcap
Archived
13
0
Fork 0

Added a missing initialization of pcap_t::timeout when an adapter is opened

with pcap_open_live. This bug caused pcap_setnonblock to misbehave when
the adapter was set to blocking mode.
This commit is contained in:
risso 2005-07-10 17:52:54 +00:00
parent 0f76cc6c77
commit 7818dbf4a4
1 changed files with 4 additions and 1 deletions

View File

@ -32,7 +32,7 @@
#ifndef lint
static const char rcsid[] _U_ =
"@(#) $Header: /tcpdump/master/libpcap/pcap-win32.c,v 1.25.2.2 2005-06-10 03:48:56 risso Exp $ (LBL)";
"@(#) $Header: /tcpdump/master/libpcap/pcap-win32.c,v 1.25.2.3 2005-07-10 17:52:54 risso Exp $ (LBL)";
#endif
#include <pcap-int.h>
@ -498,6 +498,9 @@ pcap_open_live(const char *device, int snaplen, int promisc, int to_ms,
/* Set the buffer size */
p->bufsize = PcapBufSize;
/* Store the timeout. Used by pcap_setnonblock() */
p->timeout= to_ms;
/* allocate Packet structure used during the capture */
if((p->Packet = PacketAllocatePacket())==NULL)
{