dovecot-2.0: lib-master: Don't try to close(-1)

dovecot at dovecot.org dovecot at dovecot.org
Wed Jun 24 01:35:34 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/f5d95f4fd954
changeset: 9517:f5d95f4fd954
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jun 23 17:31:29 2009 -0400
description:
lib-master: Don't try to close(-1)

diffstat:

1 file changed, 3 insertions(+), 3 deletions(-)
src/lib-master/master-service-settings.c |    6 +++---

diffs (17 lines):

diff -r aad42b172e1a -r f5d95f4fd954 src/lib-master/master-service-settings.c
--- a/src/lib-master/master-service-settings.c	Tue Jun 23 17:31:08 2009 -0400
+++ b/src/lib-master/master-service-settings.c	Tue Jun 23 17:31:29 2009 -0400
@@ -232,10 +232,10 @@ int master_service_settings_read(struct 
 		}
 	}
 
-	if ((service->flags & MASTER_SERVICE_FLAG_KEEP_CONFIG_OPEN) == 0)
+	if ((service->flags & MASTER_SERVICE_FLAG_KEEP_CONFIG_OPEN) != 0)
+		service->config_fd = fd;
+	else if (fd != -1)
 		(void)close(fd);
-	else
-		service->config_fd = fd;
 
 	/* let environment override settings. especially useful for the
 	   settings from userdb. */


More information about the dovecot-cvs mailing list