mirror of
https://github.com/nmap/nmap.git
synced 2026-01-05 14:09:02 +00:00
Don't associate nsock logging info to a nspool.
Make current loglevel and current log callback global to the library. Attaching them to the nsock pool doesn't bring any benefit and prevents from logging activity in code sections that don't have access to a pool (such as proxy chain specification parsing). Updated external calls and nsock tests accordingly.
This commit is contained in:
@@ -879,13 +879,13 @@ int ncat_connect(void)
|
||||
bye("Failed to create nsock_pool.");
|
||||
|
||||
if (o.debug >= 6)
|
||||
nsock_set_loglevel(mypool, NSOCK_LOG_DBG_ALL);
|
||||
nsock_set_loglevel(NSOCK_LOG_DBG_ALL);
|
||||
else if (o.debug >= 3)
|
||||
nsock_set_loglevel(mypool, NSOCK_LOG_DBG);
|
||||
nsock_set_loglevel(NSOCK_LOG_DBG);
|
||||
else if (o.debug >= 1)
|
||||
nsock_set_loglevel(mypool, NSOCK_LOG_INFO);
|
||||
nsock_set_loglevel(NSOCK_LOG_INFO);
|
||||
else
|
||||
nsock_set_loglevel(mypool, NSOCK_LOG_ERROR);
|
||||
nsock_set_loglevel(NSOCK_LOG_ERROR);
|
||||
|
||||
/* Allow connections to broadcast addresses. */
|
||||
nsock_pool_set_broadcast(mypool, 1);
|
||||
|
||||
Reference in New Issue
Block a user