Commit 2cc573ae authored by Alexis Murzeau's avatar Alexis Murzeau Committed by Alexandre Julliard

wpcap: Handle negative count for pcap_dispatch and pcap_loop.

According to WinPcap documentation of `pcap_dispatch` (https://www.winpcap.org/docs/docs_41b5/html/group__wpcapfunc.html#g60ce104cdf28420d3361cd36d15be44c): > A cnt of -1 processes all the packets received in one buffer when > reading a live capture, or all the packets in the file when reading a > ``savefile'' Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55487Signed-off-by: 's avatarAlexis Murzeau <amubtdx@gmail.com>
parent 1942cc30
......@@ -967,7 +967,7 @@ int CDECL pcap_dispatch( struct pcap *pcap, int count,
TRACE( "%p, %d, %p, %p\n", pcap, count, callback, user );
while (processed < count)
while (count <= 0 || processed < count)
{
struct pcap_pkthdr_win32 *hdr = NULL;
const unsigned char *data = NULL;
......@@ -1000,7 +1000,7 @@ int CDECL pcap_loop( struct pcap *pcap, int count,
TRACE( "%p, %d, %p, %p\n", pcap, count, callback, user );
while (processed < count)
while (count <= 0 || processed < count)
{
struct pcap_pkthdr_win32 *hdr = NULL;
const unsigned char *data = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment