mirror of
https://github.com/nmap/nmap.git
synced 2025-12-11 10:19: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:
@@ -239,7 +239,7 @@ int kqueue_loop(struct npool *nsp, int msec_timeout) {
|
||||
do {
|
||||
struct nevent *nse;
|
||||
|
||||
nsock_log_debug_all(nsp, "wait for events");
|
||||
nsock_log_debug_all("wait for events");
|
||||
|
||||
nse = next_expirable_event(nsp);
|
||||
if (!nse)
|
||||
@@ -290,7 +290,7 @@ int kqueue_loop(struct npool *nsp, int msec_timeout) {
|
||||
} while (results_left == -1 && sock_err == EINTR); /* repeat only if signal occurred */
|
||||
|
||||
if (results_left == -1 && sock_err != EINTR) {
|
||||
nsock_log_error(nsp, "nsock_loop error %d: %s", sock_err, socket_strerror(sock_err));
|
||||
nsock_log_error("nsock_loop error %d: %s", sock_err, socket_strerror(sock_err));
|
||||
nsp->errnum = sock_err;
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user