dovecot-2.2: doveadm replicator status: Fixed user mask to work.

dovecot at dovecot.org dovecot at dovecot.org
Sun Mar 24 16:53:38 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/ae5699ba6324
changeset: 16097:ae5699ba6324
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Mar 24 16:52:39 2013 +0200
description:
doveadm replicator status: Fixed user mask to work.

diffstat:

 src/doveadm/doveadm-replicator.c                |  9 +++++++--
 src/replication/replicator/doveadm-connection.c |  2 +-
 2 files changed, 8 insertions(+), 3 deletions(-)

diffs (38 lines):

diff -r 660d1fd6fc9c -r ae5699ba6324 src/doveadm/doveadm-replicator.c
--- a/src/doveadm/doveadm-replicator.c	Sun Mar 24 16:48:53 2013 +0200
+++ b/src/doveadm/doveadm-replicator.c	Sun Mar 24 16:52:39 2013 +0200
@@ -2,7 +2,7 @@
 
 #include "lib.h"
 #include "ioloop.h"
-#include "net.h"
+#include "strescape.h"
 #include "istream.h"
 #include "write-full.h"
 #include "master-service.h"
@@ -113,7 +113,12 @@
 	doveadm_print_header_simple("full sync");
 	doveadm_print_header_simple("failed");
 
-	replicator_send(ctx, "STATUS\n");
+	if (argv[1] == NULL)
+		replicator_send(ctx, "STATUS\n");
+	else {
+		replicator_send(ctx, t_strdup_printf("STATUS\t%s\n",
+						     str_tabescape(argv[1])));
+	}
 	while ((line = i_stream_read_next_line(ctx->input)) != NULL) {
 		if (*line == '\0')
 			break;
diff -r 660d1fd6fc9c -r ae5699ba6324 src/replication/replicator/doveadm-connection.c
--- a/src/replication/replicator/doveadm-connection.c	Sun Mar 24 16:48:53 2013 +0200
+++ b/src/replication/replicator/doveadm-connection.c	Sun Mar 24 16:52:39 2013 +0200
@@ -32,7 +32,7 @@
 	users = replicator_queue_get_users(client->queue, &count);
 	for (i = 0; i < count; i++) {
 		user = users[i];
-		if (mask != NULL && wildcard_match(user->username, mask))
+		if (mask != NULL && !wildcard_match(user->username, mask))
 			continue;
 
 		str_truncate(str, 0);


More information about the dovecot-cvs mailing list