Commit 397d7942 397d7942197ebc79d3bcb1dd92ab197e3f6aaf2d by Sergey Poznyakoff

Fix MU_EVT_MESSAGE_ADD in pop://

* libproto/pop/mbox.c (pop_scan): Make sure MU_EVT_MESSAGE_ADD is delivered
when it is already possible to retrieve the message.
* mail/mail.c (default_setup) <headline>: Use %L instead of %l.

* mu/logger.c (logger_options)<priority>: Minor fix.
1 parent e1233d55
......@@ -356,9 +356,6 @@ pop_scan (mu_mailbox_t mbox, size_t msgno, size_t *pcount)
if (mbox->observable)
{
if (mu_observable_notify (mbox->observable, MU_EVT_MESSAGE_ADD,
&num) != 0)
break;
if (((i + 1) % 10) == 0)
mu_observable_notify (mbox->observable,
MU_EVT_MAILBOX_PROGRESS,
......@@ -366,7 +363,23 @@ pop_scan (mu_mailbox_t mbox, size_t msgno, size_t *pcount)
}
}
}
mu_iterator_destroy (&itr);
if (mbox->observable)
{
/* MU_EVT_MESSAGE_ADD must be delivered only when it is already possible
to retrieve the message in question. It could not be done in the
main loop because no other pop3d function can be called while LIST
is being handled. Hence the extra loop. */
for (i = 0; i <= count; i++)
{
if (mu_observable_notify (mbox->observable, MU_EVT_MESSAGE_ADD,
&i) != 0)
break;
}
}
return status;
}
......
......@@ -289,7 +289,7 @@ static char *default_setup[] = {
"set recursivealiases",
"set noinplacealiases",
"set fromfield",
"set headline=\"%>%a%4m %18f %16d %3l/%-5o %s\"",
"set headline=\"%>%a%4m %18f %16d %3L/%-5o %s\"",
/* Start in mail reading mode */
"setq mode=read",
......
......@@ -30,7 +30,7 @@ static char logger_args_doc[] = N_("[TEXT]");
static struct argp_option logger_options[] = {
{ "file", 'f', N_("FILE"), 0, N_("read message from FILE") },
{ "priority", 'p', N_("[FACILITY.LEVEL]"), 0,
{ "priority", 'p', N_("FACILITY[.LEVEL]"), 0,
N_("log at the specified syslog priority (implies --syslog)") },
{ "syslog", OPT_SYSLOG, NULL, 0, N_("log via syslog") },
{ "stderr", OPT_STDERR, NULL, 0, N_("log to the standard error") },
......