This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU Mailutils".
http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=36a121b9d19e24815f415054926e5b2f074618df The branch, master has been updated via 36a121b9d19e24815f415054926e5b2f074618df (commit) from f8fc2081dffd950ab1c6082e4a32f0096bd7415d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 36a121b9d19e24815f415054926e5b2f074618df Author: Sergey Poznyakoff <g...@gnu.org.ua> Date: Mon Jul 13 16:31:35 2009 +0300 Fixes in client pop3 * libproto/pop/mbox.c (pop_get_message): Make sure the mailbox is scanned. (pop_top): Handle -ERR case. ----------------------------------------------------------------------- Summary of changes: libproto/pop/mbox.c | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/libproto/pop/mbox.c b/libproto/pop/mbox.c index 5992559..38a6b1d 100644 --- a/libproto/pop/mbox.c +++ b/libproto/pop/mbox.c @@ -1028,7 +1028,14 @@ pop_get_message (mu_mailbox_t mbox, size_t msgno, mu_message_t *pmsg) size_t i; /* Sanity. */ - if (pmsg == NULL || mpd == NULL || msgno > mpd->messages_count) + if (pmsg == NULL || mpd == NULL) + return EINVAL; + + /* If we did not start a scanning yet do it now. */ + if (!pop_is_updated (mbox)) + pop_scan (mbox, 1, NULL); + + if (msgno > mpd->messages_count) return EINVAL; mu_monitor_rdlock (mbox->monitor); @@ -1405,7 +1412,7 @@ pop_get_size (mu_mailbox_t mbox, mu_off_t *psize) if (mpd == NULL) return EINVAL; - if (! pop_is_updated (mbox)) + if (!pop_is_updated (mbox)) status = pop_messages_count (mbox, &mpd->size); if (psize) *psize = mpd->size; @@ -1789,8 +1796,8 @@ pop_top (mu_header_t header, char *buffer, size_t buflen, status = pop_read_ack (mpd); CHECK_EAGAIN (mpd, status); MU_DEBUG (mpd->mbox->debug, MU_DEBUG_PROT, mpd->buffer); - /* if (mu_c_strncasecmp (mpd->buffer, "+OK", 3) != 0) - mu_error ("TOP not implemented"); */ /* FIXME */ + if (mu_c_strncasecmp (mpd->buffer, "+OK", 3) != 0) + CHECK_ERROR (mpd, EINVAL); mpd->state = POP_TOP_RX; case POP_TOP_RX: hooks/post-receive -- GNU Mailutils _______________________________________________ Commit-mailutils mailing list Commit-mailutils@gnu.org http://lists.gnu.org/mailman/listinfo/commit-mailutils