mirror of
https://github.com/nmap/nmap.git
synced 2025-12-20 14:39:02 +00:00
Centralize nsock_tod updates in msevent_new.
This was being done manually for various types of events, and not doing it in every case was causing hard-to-find bugs. See the log messages for r19970 in /nsock and r28292 in /nmap.
This commit is contained in:
@@ -398,6 +398,9 @@ msevent *msevent_new(mspool *nsp, enum nse_type type, msiod *msiod, int timeout_
|
||||
nsock_ev_handler handler, void *userdata) {
|
||||
msevent *nse;
|
||||
|
||||
/* Bring us up to date for the timeout calculation. */
|
||||
gettimeofday(&nsock_tod, NULL);
|
||||
|
||||
if (msiod) {
|
||||
msiod->events_pending++;
|
||||
assert(msiod->state != NSIOD_STATE_DELETED);
|
||||
|
||||
Reference in New Issue
Block a user