dovecot-2.2: imap: Added asserts to make sure a tagline isn't se...

dovecot at dovecot.org dovecot at dovecot.org
Wed Aug 29 18:35:13 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/075dcb7eac58
changeset: 14971:075dcb7eac58
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Aug 29 18:32:01 2012 +0300
description:
imap: Added asserts to make sure a tagline isn't sent twice to the same command.

diffstat:

 src/imap/imap-client.c |  3 +++
 src/imap/imap-client.h |  1 +
 2 files changed, 4 insertions(+), 0 deletions(-)

diffs (24 lines):

diff -r 8ee60c857513 -r 075dcb7eac58 src/imap/imap-client.c
--- a/src/imap/imap-client.c	Wed Aug 29 17:15:34 2012 +0300
+++ b/src/imap/imap-client.c	Wed Aug 29 18:32:01 2012 +0300
@@ -340,6 +340,9 @@
 	if (client->output->closed || cmd->cancel)
 		return;
 
+	i_assert(!cmd->tagline_sent);
+	cmd->tagline_sent = TRUE;
+
 	if (tag == NULL || *tag == '\0')
 		tag = "*";
 
diff -r 8ee60c857513 -r 075dcb7eac58 src/imap/imap-client.h
--- a/src/imap/imap-client.h	Wed Aug 29 17:15:34 2012 +0300
+++ b/src/imap/imap-client.h	Wed Aug 29 18:32:01 2012 +0300
@@ -79,6 +79,7 @@
 	unsigned int search_save_result:1; /* search result is being updated */
 	unsigned int search_save_result_used:1; /* command uses search save */
 	unsigned int temp_executed:1; /* temporary execution state tracking */
+	unsigned int tagline_sent:1;
 };
 
 struct imap_client_vfuncs {


More information about the dovecot-cvs mailing list