dovecot: If namespace initialization fails, die with a fatal err...

dovecot at dovecot.org dovecot at dovecot.org
Tue Oct 9 17:23:17 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/12a779e08a73
changeset: 6540:12a779e08a73
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Oct 09 17:10:50 2007 +0300
description:
If namespace initialization fails, die with a fatal error message instead of
just exiting.

diffstat:

3 files changed, 3 insertions(+), 3 deletions(-)
src/deliver/deliver.c |    2 +-
src/imap/main.c       |    2 +-
src/pop3/main.c       |    2 +-

diffs (36 lines):

diff -r a93a7738c0ec -r 12a779e08a73 src/deliver/deliver.c
--- a/src/deliver/deliver.c	Tue Oct 09 17:10:10 2007 +0300
+++ b/src/deliver/deliver.c	Tue Oct 09 17:10:50 2007 +0300
@@ -783,7 +783,7 @@ int main(int argc, char *argv[])
 
 	namespace_pool = pool_alloconly_create("namespaces", 1024);
 	if (mail_namespaces_init(namespace_pool, user, &ns) < 0)
-		exit(EX_TEMPFAIL);
+		i_fatal("Namespace initialization failed");
 
 	mbox_ns = mail_namespaces_init_empty(namespace_pool);
 	mbox_ns->flags |= NAMESPACE_FLAG_INTERNAL;
diff -r a93a7738c0ec -r 12a779e08a73 src/imap/main.c
--- a/src/imap/main.c	Tue Oct 09 17:10:10 2007 +0300
+++ b/src/imap/main.c	Tue Oct 09 17:10:50 2007 +0300
@@ -232,7 +232,7 @@ static void main_init(void)
 
 	namespace_pool = pool_alloconly_create("namespaces", 1024);
 	if (mail_namespaces_init(namespace_pool, user, &ns) < 0)
-		exit(FATAL_DEFAULT);
+		i_fatal("Namespace initialization failed");
 	client = client_create(0, 1, ns);
 
         o_stream_cork(client->output);
diff -r a93a7738c0ec -r 12a779e08a73 src/pop3/main.c
--- a/src/pop3/main.c	Tue Oct 09 17:10:10 2007 +0300
+++ b/src/pop3/main.c	Tue Oct 09 17:10:50 2007 +0300
@@ -231,7 +231,7 @@ static int main_init(void)
 
 	namespace_pool = pool_alloconly_create("namespaces", 1024);
 	if (mail_namespaces_init(namespace_pool, getenv("USER"), &ns) < 0)
-		exit(FATAL_DEFAULT);
+		i_fatal("Namespace initialization failed");
 	return client_create(0, 1, ns) != NULL;
 }
 


More information about the dovecot-cvs mailing list