1
0
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:
henri
2012-01-13 12:56:20 +00:00
parent 487c08ff63
commit 520ff94839
2 changed files with 6 additions and 5 deletions

View File

@@ -112,7 +112,9 @@ void update_first_events(msevent *nse);
int socket_count_zero(msiod *iod, mspool *ms) { int socket_count_zero(msiod *iod, mspool *ms) {
iod->readsd_count = 0; iod->readsd_count = 0;
iod->writesd_count = 0; iod->writesd_count = 0;
#if HAVE_PCAP
iod->readpcapsd_count = 0; iod->readpcapsd_count = 0;
#endif
return ms->engine->iod_unregister(ms, iod); return ms->engine->iod_unregister(ms, iod);
} }
@@ -187,9 +189,9 @@ static void update_events(msiod * iod, mspool *ms, int ev_inc, int ev_dec) {
setmask = ev_inc; setmask = ev_inc;
clrmask = EV_NONE; clrmask = EV_NONE;
if ((ev_dec & EV_READ) && (!iod->readsd_count if ((ev_dec & EV_READ) && (!iod->readsd_count)
#if HAVE_PCAP #if HAVE_PCAP
&& !iod->readpcapsd_count) && (!iod->readpcapsd_count)
#endif #endif
) )
clrmask |= EV_READ; clrmask |= EV_READ;

View File

@@ -113,11 +113,10 @@ nsock_iod nsi_new2(nsock_pool nsockp, int sd, void *userdata) {
nsi->first_write = NULL; nsi->first_write = NULL;
#if HAVE_PCAP #if HAVE_PCAP
nsi->first_pcap_read = NULL; nsi->first_pcap_read = NULL;
nsi->readpcapsd_count = 0;
#endif #endif
nsi->readsd_count = 0; nsi->readsd_count = 0;
nsi->write_count = 0; nsi->write_count = 0;
nsi->readpcapsd_count = 0;
nsi->userdata = userdata; nsi->userdata = userdata;
nsi->nsp = (mspool *)nsockp; nsi->nsp = (mspool *)nsockp;