dovecot-2.0: doveadm director: Make sure write()s send everything.

dovecot at dovecot.org dovecot at dovecot.org
Thu Jun 17 17:14:34 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/744638eb4c1a
changeset: 11566:744638eb4c1a
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Jun 17 15:14:31 2010 +0100
description:
doveadm director: Make sure write()s send everything.

diffstat:

 src/doveadm/doveadm-director.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r b2ffb6846973 -r 744638eb4c1a src/doveadm/doveadm-director.c
--- a/src/doveadm/doveadm-director.c	Thu Jun 17 14:47:27 2010 +0100
+++ b/src/doveadm/doveadm-director.c	Thu Jun 17 15:14:31 2010 +0100
@@ -3,6 +3,7 @@
 #include "lib.h"
 #include "network.h"
 #include "istream.h"
+#include "write-full.h"
 #include "master-service.h"
 #include "doveadm.h"
 
@@ -20,7 +21,7 @@
 static void
 director_send(struct director_context *ctx, const char *data)
 {
-	if (write(i_stream_get_fd(ctx->input), data, strlen(data)) < 0)
+	if (write_full(i_stream_get_fd(ctx->input), data, strlen(data)) < 0)
 		i_fatal("write(%s) failed: %m", ctx->socket_path);
 }
 


More information about the dovecot-cvs mailing list