summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-01-25 15:03:36 -0500
committerNick Mathewson <nickm@torproject.org>2011-01-25 15:03:36 -0500
commite261a1a3e6513eeafa1b53b83ebfec7f5d834a39 (patch)
treefb6372b87f8d1a2a658d92b189b6c071fe904dc1 /src/common
parent23f8bedddb1b3497ea8bbafef90ae24893be9a9e (diff)
downloadtor-e261a1a3e6513eeafa1b53b83ebfec7f5d834a39.tar.gz
tor-e261a1a3e6513eeafa1b53b83ebfec7f5d834a39.zip
Simplify syntax for negated log domains
Previously if you wanted to say "All messages except network messages", you needed to say "[*,~net]" and if you said "[~net]" by mistake, you would get no messages at all. Now, if you say "[~net]", you get everything except networking messages.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/log.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/log.c b/src/common/log.c
index 2fef2cc5d9..28fca4eaca 100644
--- a/src/common/log.c
+++ b/src/common/log.c
@@ -919,7 +919,10 @@ parse_log_severity_config(const char **cfg_ptr,
smartlist_free(domains_list);
if (err)
return -1;
- domains &= ~neg_domains;
+ if (domains == 0 && neg_domains)
+ domains = ~neg_domains;
+ else
+ domains &= ~neg_domains;
cfg = eat_whitespace(closebracket+1);
} else {
++got_an_unqualified_range;