diff options
| author | Pablo Neira Ayuso <pablo@gnumonks.org> | 2011-08-11 13:24:18 +0200 | 
|---|---|---|
| committer | Harald Welte <laforge@gnumonks.org> | 2011-08-11 14:33:16 +0200 | 
| commit | 300e78d3e5714449e73a056dd5878adab97c6423 (patch) | |
| tree | ccc0de3e9c944ca6f94122f0c43a408947a2a1a3 | |
| parent | e581516b26da54f8d73fca6640ab1a5df16bc6e8 (diff) | |
logging: fix parsing of logging mask (-d DMI case)
Without this patch, `-d DMI' enables logging for DMI and DMIB.
Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
| -rw-r--r-- | src/logging.c | 5 | 
1 files changed, 5 insertions, 0 deletions
diff --git a/src/logging.c b/src/logging.c index 11d63ac9..e85e8fcb 100644 --- a/src/logging.c +++ b/src/logging.c @@ -157,6 +157,11 @@ void log_parse_category_mask(struct log_target* target, const char *_mask)  		for (i = 0; i < osmo_log_info->num_cat; ++i) {  			char* colon = strstr(category_token, ",");  			int length = strlen(category_token); +			int cat_length = strlen(osmo_log_info->cat[i].name); + +			/* Use longest length not to match subocurrences. */ +			if (cat_length > length) +				length = cat_length;  			if (!osmo_log_info->cat[i].name)  				continue;  | 
