summaryrefslogtreecommitdiff
path: root/mailbox
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2005-03-03 10:55:02 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2005-03-03 10:55:02 +0000
commit977ac58a4362bacbf666c2e68825c21960cbcd9b (patch)
tree480fa4d45c15704d94276e1ee60b89cc7c5a297c /mailbox
parentd60d3bec2f8aebb0c1e57e1c99bb96afd69c18c2 (diff)
downloadmailutils-977ac58a4362bacbf666c2e68825c21960cbcd9b.tar.gz
mailutils-977ac58a4362bacbf666c2e68825c21960cbcd9b.tar.bz2
(mbox_scan): Store the number of messages into *pcount if we don't need to rescan the mailbox.
Diffstat (limited to 'mailbox')
-rw-r--r--mailbox/mbox/mbox.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mailbox/mbox/mbox.c b/mailbox/mbox/mbox.c
index 5551b39ef..dfda54ad1 100644
--- a/mailbox/mbox/mbox.c
+++ b/mailbox/mbox/mbox.c
@@ -337,7 +337,7 @@ mbox_scan (mailbox_t mailbox, size_t msgno, size_t *pcount)
return mbox_scan0 (mailbox, msgno, pcount, 1);
/* Since the mailbox is already updated fake the scan. */
if (msgno > 0)
- msgno--; /* The fist message is number "1", decremente for the C array. */
+ msgno--; /* The fist message is number "1", decrement for the C array. */
for (i = msgno; i < mud->messages_count; i++)
{
if (observable_notify (mailbox->observable, MU_EVT_MESSAGE_ADD) != 0)
@@ -347,6 +347,7 @@ mbox_scan (mailbox_t mailbox, size_t msgno, size_t *pcount)
observable_notify (mailbox->observable, MU_EVT_MAILBOX_PROGRESS);
}
}
+ *pcount = mud->messages_count;
return 0;
}

Return to:

Send suggestions and report system problems to the System administrator.