1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-20 14:39:02 +00:00

Manage expiration times via a heap queue.

This prevents nsock from iterating over the whole list of events at
each runloop, thus improving performance.

It made it necessary to have pointers from the msevents to the event
lists they belong to. The patch therefore also changes gh_list from
autonomous containers to embedded structures.

Added unit tests accordingly and cosmetic changes to make things look
more consistent.
This commit is contained in:
henri
2013-08-10 23:59:30 +00:00
parent 23457a77c0
commit 853aaff586
28 changed files with 1304 additions and 801 deletions

View File

@@ -204,7 +204,7 @@ void nsock_connect_internal(mspool *ms, msevent *nse, int type, int proto, struc
nsock_log_debug_all(ms, "TCP connection request (EID %lu) redirected through proxy chain",
(long)nse->id);
current = proxy_ctx_node_current(iod->px_ctx);
current = iod->px_ctx->px_current;
assert(current != NULL);
memcpy(&iod->px_ctx->target_ss, ss, sslen);