# HG changeset patch # User Timo Sirainen # Date 1233958797 18000 # Node ID 4142c933e231474fea926a4a46d642d82733f434 # Parent 3949c6d2e4c8db83816a50a1d385a34f730dfe9b dict sql: If connect setting isn't given, give an error message instead of crashing. diff -r 3949c6d2e4c8 -r 4142c933e231 src/lib-dict/dict-sql-settings.c --- a/src/lib-dict/dict-sql-settings.c Fri Feb 06 13:49:07 2009 -0500 +++ b/src/lib-dict/dict-sql-settings.c Fri Feb 06 17:19:57 2009 -0500 @@ -211,5 +211,11 @@ if (!settings_read(path, NULL, parse_setting, parse_section, &ctx)) return NULL; + if (ctx.set->connect == NULL) { + i_error("Error in configuration file %s: " + "Missing connect setting", path); + return NULL; + } + return ctx.set; }