dovecot-2.1: auth: Handle auth worker creation failure without k...

dovecot at dovecot.org dovecot at dovecot.org
Sat Nov 19 23:42:16 EET 2011


details:   http://hg.dovecot.org/dovecot-2.1/rev/6b62d786fdc4
changeset: 13736:6b62d786fdc4
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Nov 19 23:28:18 2011 +0200
description:
auth: Handle auth worker creation failure without killing the whole auth process.

diffstat:

 src/auth/auth-worker-server.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 6e87e399ccd7 -r 6b62d786fdc4 src/auth/auth-worker-server.c
--- a/src/auth/auth-worker-server.c	Sat Nov 19 23:15:19 2011 +0200
+++ b/src/auth/auth-worker-server.c	Sat Nov 19 23:28:18 2011 +0200
@@ -155,12 +155,13 @@
 	fd = net_connect_unix_with_retries(worker_socket_path, 5000);
 	if (fd == -1) {
 		if (errno == EACCES) {
-			i_fatal("%s", eacces_error_get("net_connect_unix",
+			i_error("%s", eacces_error_get("net_connect_unix",
 						       worker_socket_path));
 		} else {
-			i_fatal("net_connect_unix(%s) failed: %m",
+			i_error("net_connect_unix(%s) failed: %m",
 				worker_socket_path);
 		}
+		return NULL;
 	}
 
 	conn = i_new(struct auth_worker_connection, 1);
@@ -217,7 +218,8 @@
 
 	if (idle_count == 0 && restart) {
 		conn = auth_worker_create();
-		auth_worker_request_send_next(conn);
+		if (conn != NULL)
+			auth_worker_request_send_next(conn);
 	}
 }
 


More information about the dovecot-cvs mailing list