[Dovecot] FETCH order fix backport to stable from test66
I've had a go at back-porting Timo's recent fixes to the IMAP fetch command from 1.0-test66 to 1.0-stable. This seems to fix the problem with kmail, and Thunderbird seems to work fine without its RFC822.SIZE fix. It's a bit big for the body of this message, so it's attached. The bit I'm most concerned about in my port is whether I got the buffer_insert call right (back-ported from an array_insert call) in imap-fetch.c :- @@ -119,8 +129,14 @@ memset(&h, 0, sizeof(h)); h.handler = handler; h.context = context; + h.buffered = buffered; - buffer_append(ctx->handlers, &h, sizeof(h)); + if (!buffered) + buffer_append(ctx->handlers, &h, sizeof(h)); + else { + buffer_insert(ctx->handlers, ctx->buffered_handlers_count * size of(h), &h, sizeof(h)); + ctx->buffered_handlers_count++; + } } Best Wishes, Chris --+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-- Christopher Wakelin, c.d.wakelin@reading.ac.uk IT Services Centre, The University of Reading, Tel: +44 (0)118 378 8439 Whiteknights, Reading, RG6 2AF, UK Fax: +44 (0)118 975 3094
participants (1)
-
Chris Wakelin