mirror of
https://github.com/nmap/nmap.git
synced 2026-01-04 13:49:03 +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:
@@ -1451,9 +1451,9 @@ int EchoServer::start() {
|
||||
/* Set nsock trace level */
|
||||
gettimeofday(&now, NULL);
|
||||
if( o.getDebugging() == DBG_5 )
|
||||
nsock_set_loglevel(nsp, NSOCK_LOG_INFO);
|
||||
nsock_set_loglevel(NSOCK_LOG_INFO);
|
||||
else if( o.getDebugging() > DBG_5 )
|
||||
nsock_set_loglevel(nsp, NSOCK_LOG_DBG_ALL);
|
||||
nsock_set_loglevel(NSOCK_LOG_DBG_ALL);
|
||||
|
||||
/* Create new IOD for pcap */
|
||||
if ((pcap_nsi = nsock_iod_new(nsp, NULL)) == NULL)
|
||||
|
||||
@@ -162,9 +162,9 @@ int ProbeMode::init_nsock(){
|
||||
/* Set nsock trace level */
|
||||
gettimeofday(&now, NULL);
|
||||
if( o.getDebugging() == DBG_5)
|
||||
nsock_set_loglevel(nsp, NSOCK_LOG_INFO);
|
||||
nsock_set_loglevel(NSOCK_LOG_INFO);
|
||||
else if( o.getDebugging() > DBG_5 )
|
||||
nsock_set_loglevel(nsp, NSOCK_LOG_DBG_ALL);
|
||||
nsock_set_loglevel(NSOCK_LOG_DBG_ALL);
|
||||
/* Flag it as already initialized so we don't do it again */
|
||||
nsock_init=true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user