mirror of
https://github.com/nmap/nmap.git
synced 2025-12-27 18:09:01 +00:00
Optimistically revert mutex that was needed with WinPcap. Npcap likely is unaffected.
This commit is contained in:
@@ -4094,8 +4094,6 @@ pcap_t *my_pcap_open_live(const char *device, int snaplen, int promisc, int to_m
|
||||
with what we have then ... */
|
||||
Strncpy(pcapdev, device, sizeof(pcapdev));
|
||||
}
|
||||
HANDLE pcapMutex = CreateMutex(NULL, 0, TEXT("Global\\DnetPcapHangAvoidanceMutex"));
|
||||
DWORD wait = WaitForSingleObject(pcapMutex, INFINITE);
|
||||
#else
|
||||
Strncpy(pcapdev, device, sizeof(pcapdev));
|
||||
#endif
|
||||
@@ -4145,10 +4143,6 @@ pcap_t *my_pcap_open_live(const char *device, int snaplen, int promisc, int to_m
|
||||
#endif /* not __amigaos__ */
|
||||
|
||||
#ifdef WIN32
|
||||
if (wait == WAIT_ABANDONED || wait == WAIT_OBJECT_0) {
|
||||
ReleaseMutex(pcapMutex);
|
||||
}
|
||||
CloseHandle(pcapMutex);
|
||||
/* We want any responses back ASAP */
|
||||
/* This is unnecessary with Npcap since libpcap calls PacketSetMinToCopy(0)
|
||||
* based on immediate mode. Have not determined if it is needed for WinPcap
|
||||
|
||||
Reference in New Issue
Block a user