mirror of
https://github.com/nmap/nmap.git
synced 2025-12-19 05:59:01 +00:00
Fixed HAVE_PCAP=0 case.
This commit is contained in:
@@ -112,7 +112,9 @@ void update_first_events(msevent *nse);
|
||||
int socket_count_zero(msiod *iod, mspool *ms) {
|
||||
iod->readsd_count = 0;
|
||||
iod->writesd_count = 0;
|
||||
#if HAVE_PCAP
|
||||
iod->readpcapsd_count = 0;
|
||||
#endif
|
||||
return ms->engine->iod_unregister(ms, iod);
|
||||
}
|
||||
|
||||
@@ -187,11 +189,11 @@ static void update_events(msiod * iod, mspool *ms, int ev_inc, int ev_dec) {
|
||||
setmask = ev_inc;
|
||||
clrmask = EV_NONE;
|
||||
|
||||
if ((ev_dec & EV_READ) && (!iod->readsd_count
|
||||
if ((ev_dec & EV_READ) && (!iod->readsd_count)
|
||||
#if HAVE_PCAP
|
||||
&& !iod->readpcapsd_count)
|
||||
&& (!iod->readpcapsd_count)
|
||||
#endif
|
||||
)
|
||||
)
|
||||
clrmask |= EV_READ;
|
||||
|
||||
if ((ev_dec & EV_WRITE) && (!iod->writesd_count))
|
||||
|
||||
@@ -113,11 +113,10 @@ nsock_iod nsi_new2(nsock_pool nsockp, int sd, void *userdata) {
|
||||
nsi->first_write = NULL;
|
||||
#if HAVE_PCAP
|
||||
nsi->first_pcap_read = NULL;
|
||||
nsi->readpcapsd_count = 0;
|
||||
#endif
|
||||
|
||||
nsi->readsd_count = 0;
|
||||
nsi->write_count = 0;
|
||||
nsi->readpcapsd_count = 0;
|
||||
|
||||
nsi->userdata = userdata;
|
||||
nsi->nsp = (mspool *)nsockp;
|
||||
|
||||
Reference in New Issue
Block a user