changeset 8305:e4d0ce4d3420 HEAD

Don't show the WhyDoesItNotWork link if auth_debug=yes already.
author Timo Sirainen <tss@iki.fi>
date Mon, 20 Oct 2008 20:00:19 +0300
parents ab22ace44190
children 3e8f847f68a4
files src/master/main.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/master/main.c	Sun Oct 19 14:46:13 2008 +0300
+++ b/src/master/main.c	Mon Oct 20 20:00:19 2008 +0300
@@ -100,12 +100,13 @@
 		i_error("unlink(%s) failed: %m", path);
 }
 
-static void auth_warning_print(void)
+static void auth_warning_print(const struct server_settings *set)
 {
 	struct stat st;
 
 	auth_success_written = stat(AUTH_SUCCESS_PATH, &st) == 0;
-	if (!auth_success_written) {
+	if (!auth_success_written && !set->auths->debug &&
+	    strcmp(set->defaults->protocols, "none") != 0) {
 		i_info("If you have trouble with authentication failures,\n"
 		       "enable auth_debug setting. "
 		       "See http://wiki.dovecot.org/WhyDoesItNotWork");
@@ -573,8 +574,7 @@
 		open_fds();
 
 	fatal_log_check();
-	if (strcmp(settings_root->defaults->protocols, "none") != 0)
-		auth_warning_print();
+	auth_warning_print(settings_root);
 	if (!foreground)
 		daemonize(settings_root->defaults);