diff options
| author | Pablo Neira Ayuso <pablo@gnumonks.org> | 2011-05-03 22:32:48 +0200 | 
|---|---|---|
| committer | Harald Welte <laforge@gnumonks.org> | 2011-05-04 11:07:13 +0200 | 
| commit | 81e9636454294ae10ef9bc8bf149dd0248afce76 (patch) | |
| tree | b71301c322dd951faa0ad43220c4ce4698095966 | |
| parent | 7503fb8e3edf07b1e15907dc17822e4dad9a72ea (diff) | |
logging: remove workaround now that _output() has been reworked
This patch removes a workaround to fix some strange memory corruption
now that _output() has been completely reworked and we make use of
snprintf appropriately.
| -rw-r--r-- | src/logging.c | 15 | 
1 files changed, 3 insertions, 12 deletions
diff --git a/src/logging.c b/src/logging.c index 526b39e3..6797afcd 100644 --- a/src/logging.c +++ b/src/logging.c @@ -221,19 +221,10 @@ static void _logp(unsigned int subsys, int level, char *file, int line,  		else if (osmo_log_info->filter_fn)  			output = osmo_log_info->filter_fn(&log_context,  						       tar); +		if (!output) +			continue; -		if (output) { -			/* FIXME: copying the va_list is an ugly -			 * workaround against a bug hidden somewhere in -			 * _output.  If we do not copy here, the first -			 * call to _output() will corrupt the va_list -			 * contents, and any further _output() calls -			 * with the same va_list will segfault */ -			va_list bp; -			va_copy(bp, ap); -			_output(tar, subsys, level, file, line, cont, format, bp); -			va_end(bp); -		} +		_output(tar, subsys, level, file, line, cont, format, ap);  	}  }  | 
