Mercurial > dovecot > core-2.2
changeset 14971:075dcb7eac58
imap: Added asserts to make sure a tagline isn't sent twice to the same command.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 29 Aug 2012 18:32:01 +0300 |
parents | 8ee60c857513 |
children | 20ad509a559a |
files | src/imap/imap-client.c src/imap/imap-client.h |
diffstat | 2 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 = "*";
--- 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 {