1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +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:
henri
2015-06-27 08:21:53 +00:00
parent b75233ce98
commit b55ff2d68f
34 changed files with 222 additions and 209 deletions

View File

@@ -2677,7 +2677,7 @@ static inline const char *nslog2str(nsock_loglevel_t loglevel) {
};
}
void nmap_adjust_loglevel(nsock_pool nsp, bool trace) {
void nmap_adjust_loglevel(bool trace) {
nsock_loglevel_t nsock_loglevel;
if (o.debugging >= 7)
@@ -2689,10 +2689,10 @@ void nmap_adjust_loglevel(nsock_pool nsp, bool trace) {
else
nsock_loglevel = NSOCK_LOG_ERROR;
nsock_set_loglevel(nsp, nsock_loglevel);
nsock_set_loglevel(nsock_loglevel);
}
void nmap_nsock_stderr_logger(nsock_pool nsp, const struct nsock_log_rec *rec) {
void nmap_nsock_stderr_logger(const struct nsock_log_rec *rec) {
int elapsed_time;
elapsed_time = TIMEVAL_MSEC_SUBTRACT(rec->time, *(o.getStartTime()));