commit cf6a7b4d182d2fe82f7371af9e5a857818f3d02d
parent 7e1c16ae02b9b880d72982205169adbd68c1a954
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date: Sat, 12 Mar 2011 16:20:48 +0100
less bizarre code
we know that there is only one command in progress, so there
is no need to employ tricks to access the last command.
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/drv_imap.c b/src/drv_imap.c
@@ -1040,8 +1040,7 @@ get_cmd_result( imap_store_t *ctx, struct imap_cmd *tcmd )
} else if (*arg == '+') {
/* This can happen only with the last command underway, as
it enforces a round-trip. */
- cmdp = (struct imap_cmd *)((char *)ctx->in_progress_append -
- offsetof(struct imap_cmd, next));
+ cmdp = ctx->in_progress;
if (cmdp->param.data) {
n = socket_write( &ctx->buf.sock, cmdp->param.data, cmdp->param.data_len );
free( cmdp->param.data );