dovecot-2.2: doveadm director map -u: Don't connect to director ...

dovecot at dovecot.org dovecot at dovecot.org
Wed Apr 23 19:34:22 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/45bedf335e92
changeset: 17258:45bedf335e92
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Apr 23 22:33:48 2014 +0300
description:
doveadm director map -u: Don't connect to director socket, it's not needed.

diffstat:

 src/doveadm/doveadm-director.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r bc9863fa07af -r 45bedf335e92 src/doveadm/doveadm-director.c
--- a/src/doveadm/doveadm-director.c	Wed Apr 23 22:30:28 2014 +0300
+++ b/src/doveadm/doveadm-director.c	Wed Apr 23 22:33:48 2014 +0300
@@ -78,9 +78,11 @@
 
 static void director_disconnect(struct director_context *ctx)
 {
-	if (ctx->input->stream_errno != 0)
-		i_fatal("read(%s) failed: %m", ctx->socket_path);
-	i_stream_destroy(&ctx->input);
+	if (ctx->input != NULL) {
+		if (ctx->input->stream_errno != 0)
+			i_fatal("read(%s) failed: %m", ctx->socket_path);
+		i_stream_destroy(&ctx->input);
+	}
 }
 
 static struct director_context *
@@ -113,7 +115,8 @@
 			director_cmd_help(cmd);
 		}
 	}
-	director_connect(ctx);
+	if (!ctx->user_map)
+		director_connect(ctx);
 	return ctx;
 }
 


More information about the dovecot-cvs mailing list