summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libproto/dotmail/dotmail.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libproto/dotmail/dotmail.c b/libproto/dotmail/dotmail.c
index 48ca756..fa083bb 100644
--- a/libproto/dotmail/dotmail.c
+++ b/libproto/dotmail/dotmail.c
@@ -329,6 +329,9 @@ dotmail_rescan_unlocked (mu_mailbox_t mailbox, mu_off_t offset)
329 int i, j; 329 int i, j;
330 int force_init_uids = 0; 330 int force_init_uids = 0;
331 331
332 if (!(mailbox->flags & MU_STREAM_READ))
333 return 0;
334
332 rc = mu_streamref_create (&stream, mailbox->stream); 335 rc = mu_streamref_create (&stream, mailbox->stream);
333 if (rc) 336 if (rc)
334 { 337 {
@@ -590,6 +593,9 @@ dotmail_rescan (mu_mailbox_t mailbox, mu_off_t offset)
590 if (!dmp) 593 if (!dmp)
591 return EINVAL; 594 return EINVAL;
592 595
596 if (!(mailbox->flags & MU_STREAM_READ))
597 return 0;
598
593 mu_monitor_wrlock (mailbox->monitor); 599 mu_monitor_wrlock (mailbox->monitor);
594#ifdef WITH_PTHREAD 600#ifdef WITH_PTHREAD
595 pthread_cleanup_push (dotmail_cleanup, (void *)mailbox); 601 pthread_cleanup_push (dotmail_cleanup, (void *)mailbox);

Return to:

Send suggestions and report system problems to the System administrator.