changeset 3637:e30f6e541c2f HEAD

And lock_method fixes..
author Timo Sirainen <tss@iki.fi>
date Tue, 04 Oct 2005 00:25:03 +0300
parents 08b768956051
children 4e55969a6a93
files src/deliver/deliver.c src/imap/namespace.c src/pop3/main.c
diffstat 3 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/deliver/deliver.c	Tue Oct 04 00:23:18 2005 +0300
+++ b/src/deliver/deliver.c	Tue Oct 04 00:25:03 2005 +0300
@@ -433,9 +433,10 @@
 	    str != NULL && var_get_key(str + 1) == 'm')
 		flags |= MAIL_STORAGE_FLAG_KEEP_HEADER_MD5;
 
+	str = getenv("LOCK_METHOD");
 	if (str == NULL || strcmp(str, "flock") == 0)
 		lock_method = MAIL_STORAGE_LOCK_FLOCK;
-	if (strcmp(str, "fcntl") == 0)
+	else if (strcmp(str, "fcntl") == 0)
 		lock_method = MAIL_STORAGE_LOCK_FCNTL;
 	else if (strcmp(str, "dotlock") == 0)
 		lock_method = MAIL_STORAGE_LOCK_DOTLOCK;
--- a/src/imap/namespace.c	Tue Oct 04 00:23:18 2005 +0300
+++ b/src/imap/namespace.c	Tue Oct 04 00:25:03 2005 +0300
@@ -107,7 +107,7 @@
 	str = getenv("LOCK_METHOD");
 	if (str == NULL || strcmp(str, "flock") == 0)
 		lock_method = MAIL_STORAGE_LOCK_FLOCK;
-	if (strcmp(str, "fcntl") == 0)
+	else if (strcmp(str, "fcntl") == 0)
 		lock_method = MAIL_STORAGE_LOCK_FCNTL;
 	else if (strcmp(str, "dotlock") == 0)
 		lock_method = MAIL_STORAGE_LOCK_DOTLOCK;
--- a/src/pop3/main.c	Tue Oct 04 00:23:18 2005 +0300
+++ b/src/pop3/main.c	Tue Oct 04 00:25:03 2005 +0300
@@ -211,7 +211,7 @@
 	str = getenv("LOCK_METHOD");
 	if (str == NULL || strcmp(str, "flock") == 0)
 		lock_method = MAIL_STORAGE_LOCK_FLOCK;
-	if (strcmp(str, "fcntl") == 0)
+	else if (strcmp(str, "fcntl") == 0)
 		lock_method = MAIL_STORAGE_LOCK_FCNTL;
 	else if (strcmp(str, "dotlock") == 0)
 		lock_method = MAIL_STORAGE_LOCK_DOTLOCK;