From: Timo Sirainen Date: Thu, 28 Jan 2010 21:14:52 +0000 (+0200) Subject: config: Added support for protocol !name {} X-Git-Tag: 2.0.beta2~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4c104ff1cf1d5adbc7c20b650741dee364aa9234;p=thirdparty%2Fdovecot%2Fcore.git config: Added support for protocol !name {} --HG-- branch : HEAD --- diff --git a/src/config/config-filter.c b/src/config/config-filter.c index 5b05f710cf..b63dbf5a14 100644 --- a/src/config/config-filter.c +++ b/src/config/config-filter.c @@ -17,8 +17,14 @@ bool config_filter_match(const struct config_filter *mask, if (mask->service != NULL) { if (filter->service == NULL) return FALSE; - if (strcmp(filter->service, mask->service) != 0) - return FALSE; + if (mask->service[0] == '!') { + /* not service */ + if (strcmp(filter->service, mask->service + 1) == 0) + return FALSE; + } else { + if (strcmp(filter->service, mask->service) != 0) + return FALSE; + } } if (mask->local_host != NULL) { if (filter->local_host == NULL)