* mailbox/body.c: Remove unneeded prototype.
* mailbox/mbx_imap.c (mailbox_imap_close): Clear the callback string structure. (imap_scan0): Clear the callback string structure. (imap_append_message): Remove unused variable.
Showing
2 changed files
with
18 additions
and
1 deletions
... | @@ -38,7 +38,6 @@ static int _body_read __P ((stream_t, char *, size_t, off_t, size_t *)); | ... | @@ -38,7 +38,6 @@ static int _body_read __P ((stream_t, char *, size_t, off_t, size_t *)); |
38 | static int _body_readline __P ((stream_t, char *, size_t, off_t, size_t *)); | 38 | static int _body_readline __P ((stream_t, char *, size_t, off_t, size_t *)); |
39 | static int _body_truncate __P ((stream_t, off_t)); | 39 | static int _body_truncate __P ((stream_t, off_t)); |
40 | static int _body_size __P ((stream_t, off_t *)); | 40 | static int _body_size __P ((stream_t, off_t *)); |
41 | static int _body_lines __P ((stream_t, size_t *)); | ||
42 | static int _body_write __P ((stream_t, const char *, size_t, off_t, size_t *)); | 41 | static int _body_write __P ((stream_t, const char *, size_t, off_t, size_t *)); |
43 | static int _body_get_size __P ((body_t, size_t *)); | 42 | static int _body_get_size __P ((body_t, size_t *)); |
44 | static int _body_get_lines __P ((body_t, size_t *)); | 43 | static int _body_get_lines __P ((body_t, size_t *)); | ... | ... |
... | @@ -312,6 +312,12 @@ mailbox_imap_close (mailbox_t mailbox) | ... | @@ -312,6 +312,12 @@ mailbox_imap_close (mailbox_t mailbox) |
312 | m_imap->messages_count = 0; | 312 | m_imap->messages_count = 0; |
313 | m_imap->recent = 0; | 313 | m_imap->recent = 0; |
314 | m_imap->unseen = 0; | 314 | m_imap->unseen = 0; |
315 | /* Clear the callback string structure. */ | ||
316 | stream_truncate (f_imap->string.stream, 0); | ||
317 | f_imap->string.offset = 0; | ||
318 | f_imap->string.nleft = 0; | ||
319 | f_imap->string.type = IMAP_NO_STATE; | ||
320 | f_imap->string.msg_imap = NULL; | ||
315 | monitor_unlock (mailbox->monitor); | 321 | monitor_unlock (mailbox->monitor); |
316 | } | 322 | } |
317 | break; | 323 | break; |
... | @@ -640,11 +646,23 @@ imap_scan0 (mailbox_t mailbox, size_t msgno, size_t *pcount, int notif) | ... | @@ -640,11 +646,23 @@ imap_scan0 (mailbox_t mailbox, size_t msgno, size_t *pcount, int notif) |
640 | status = imap_send (f_imap); | 646 | status = imap_send (f_imap); |
641 | CHECK_EAGAIN (f_imap, status); | 647 | CHECK_EAGAIN (f_imap, status); |
642 | f_imap->state = IMAP_SCAN_ACK; | 648 | f_imap->state = IMAP_SCAN_ACK; |
649 | /* Clear the callback string structure. */ | ||
650 | stream_truncate (f_imap->string.stream, 0); | ||
651 | f_imap->string.offset = 0; | ||
652 | f_imap->string.nleft = 0; | ||
653 | f_imap->string.type = IMAP_NO_STATE; | ||
654 | f_imap->string.msg_imap = NULL; | ||
643 | 655 | ||
644 | case IMAP_SCAN_ACK: | 656 | case IMAP_SCAN_ACK: |
645 | status = imap_parse (f_imap); | 657 | status = imap_parse (f_imap); |
646 | CHECK_EAGAIN (f_imap, status); | 658 | CHECK_EAGAIN (f_imap, status); |
647 | MAILBOX_DEBUG0 (mailbox, MU_DEBUG_PROT, f_imap->buffer); | 659 | MAILBOX_DEBUG0 (mailbox, MU_DEBUG_PROT, f_imap->buffer); |
660 | /* Clear the callback string structure. */ | ||
661 | stream_truncate (f_imap->string.stream, 0); | ||
662 | f_imap->string.offset = 0; | ||
663 | f_imap->string.nleft = 0; | ||
664 | f_imap->string.type = IMAP_NO_STATE; | ||
665 | f_imap->string.msg_imap = NULL; | ||
648 | break; | 666 | break; |
649 | 667 | ||
650 | default: | 668 | default: | ... | ... |
-
Please register or sign in to post a comment