From: Timo Sirainen Date: Fri, 23 Jul 2004 18:38:35 +0000 (+0300) Subject: Better error message for unknown fields in mail*_cache_fields X-Git-Tag: 1.1.alpha1~3748 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06ee1ce135959a00bfc98f89738743ee6c3376db;p=thirdparty%2Fdovecot%2Fcore.git Better error message for unknown fields in mail*_cache_fields --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/index-storage.c b/src/lib-storage/index/index-storage.c index 99275847ea..826fad97cb 100644 --- a/src/lib-storage/index/index-storage.c +++ b/src/lib-storage/index/index-storage.c @@ -174,7 +174,7 @@ void index_storage_destroy_unrefed(void) destroy_unrefed(TRUE); } -static void set_cache_decisions(const char *fields, +static void set_cache_decisions(const char *set, const char *fields, enum mail_cache_decision_type dec) { const char *const *arr; @@ -191,8 +191,8 @@ static void set_cache_decisions(const char *fields, } } if (i == MAIL_CACHE_FIELD_COUNT) { - i_error("Invalid cache field name '%s', ignoring ", - *arr); + i_error("%s: Invalid cache field name '%s', ignoring ", + set, *arr); } } } @@ -205,9 +205,10 @@ static void index_cache_register_defaults(struct mail_cache *cache) if (never_env == NULL) never_env = DEFAULT_NEVER_CACHE_FIELDS; - set_cache_decisions(getenv("MAIL_CACHE_FIELDS"), + set_cache_decisions("mail_cache_fields", getenv("MAIL_CACHE_FIELDS"), MAIL_CACHE_DECISION_TEMP); - set_cache_decisions(never_env, MAIL_CACHE_DECISION_NO | + set_cache_decisions("mail_never_cache_fields", never_env, + MAIL_CACHE_DECISION_NO | MAIL_CACHE_DECISION_FORCED); mail_cache_register_fields(cache, cache_fields,