The code for IMAP, is a pain, the rewrite should clean all those
hacks. Something to remember for the mailbox2 is to do some smart caching, the current buffered stream is not good enough. * configure.in: VERSION is set to 0.0.9a for the alpha. * frm/frm.c: Protype for usage(). get_personal() should use const char *. * mail/mail.c (main): Use mailbox_scan() instead of mailbox_messages_count () it is faster for IMAP. * mailbox/mbx_imap.c(imap_get_message0): Remove the stream_setbufsiz() it is no longer used. (imap_message_readline imap_body_readline): Bug fix, readline will only consume up to '\n' even though the buffer is bigger. So we have to adjust the offset/lines/size to reflect what we consume. This is not very good for example doing: { off_t offset = 14; char buffer[512]; stream_readline (stream, buffer, sizeof buffer, offset, NULL); ... } Will send to the impap server. C: g445 FETCH 4 BODY.PEEK[2]<0.2048> S: * 4 FETCH (BODY[2]<0> {739} S: g445 OK FETCH completed This is waste since the first line is only 37 bytes. We will have to come up on the second API with some smart caching. * mailbox/memory_stream.c (_memory_write): Nasty bug was not updating the stream size. * mailbox/stream.c(stream_readline): Take care of known case where the buflen is 0 or 1.
Showing
7 changed files
with
199 additions
and
45 deletions
-
Please register or sign in to post a comment