dovecot-2.0: lib-master: Fixed local host {} specific settings.
dovecot at dovecot.org
dovecot at dovecot.org
Fri Mar 26 23:26:45 EET 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/ad135ced2732
changeset: 10992:ad135ced2732
user: Timo Sirainen <tss at iki.fi>
date: Fri Mar 26 23:26:39 2010 +0200
description:
lib-master: Fixed local host {} specific settings.
Based on fix by Julien Moutinho
diffstat:
src/lib-master/master-service-settings-cache.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diffs (37 lines):
diff -r 094c6a082caf -r ad135ced2732 src/lib-master/master-service-settings-cache.c
--- a/src/lib-master/master-service-settings-cache.c Fri Mar 26 16:23:05 2010 +0200
+++ b/src/lib-master/master-service-settings-cache.c Fri Mar 26 23:26:39 2010 +0200
@@ -114,7 +114,7 @@
const struct master_service_settings_input *input,
const struct setting_parser_context **parser_r)
{
- struct settings_entry *entry;
+ struct settings_entry *entry = NULL;
if (!cache->done_initial_lookup)
return FALSE;
@@ -130,16 +130,18 @@
if (cache->service_uses_remote)
return FALSE;
- if (cache->local_host_hash != NULL && input->local_host != NULL) {
- /* see if we have it already in cache */
- entry = hash_table_lookup(cache->local_host_hash,
- input->local_host);
+ /* see if we have it already in cache. if local_host is specified,
+ don't even try to use local_ip (even though we have it), because
+ there may be different settings specifically for local_host */
+ if (input->local_host != NULL) {
+ if (cache->local_host_hash != NULL) {
+ entry = hash_table_lookup(cache->local_host_hash,
+ input->local_host);
+ }
} else if (cache->local_ip_hash != NULL &&
input->local_ip.family != 0) {
entry = hash_table_lookup(cache->local_ip_hash,
&input->local_ip);
- } else {
- entry = NULL;
}
if (entry != NULL) {
More information about the dovecot-cvs
mailing list