1
0
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:
david
2012-03-29 17:43:35 +00:00
parent c6e7647f57
commit b1583a66e6
3 changed files with 3 additions and 18 deletions

View File

@@ -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);