comparison src/plugins/virtual/virtual-sync.c @ 8334:ba6ec21af651 HEAD

Virtual mailboxes: Another crashfix.
author Timo Sirainen <tss@iki.fi>
date Sat, 25 Oct 2008 20:03:44 +0300
parents 3a579de74dae
children fa564d405f51
comparison
equal deleted inserted replaced
8333:0738739a8152 8334:ba6ec21af651
556 556
557 /* changes done from now on must update the sync queue */ 557 /* changes done from now on must update the sync queue */
558 virtual_sync_backend_remove_expunged_uids(result); 558 virtual_sync_backend_remove_expunged_uids(result);
559 559
560 /* get list of changed messages */ 560 /* get list of changed messages */
561 if (!mail_index_lookup_seq_range(ibox->view, 1, bbox->sync_next_uid-1, 561 if (bbox->sync_next_uid <= 1 ||
562 !mail_index_lookup_seq_range(ibox->view, 1, bbox->sync_next_uid-1,
562 &seq, &old_msg_count)) 563 &seq, &old_msg_count))
563 old_msg_count = 0; 564 old_msg_count = 0;
564 t_array_init(&flag_updates, I_MIN(128, old_msg_count)); 565 t_array_init(&flag_updates, I_MIN(128, old_msg_count));
565 for (seq = 1; seq <= old_msg_count; seq++) { 566 for (seq = 1; seq <= old_msg_count; seq++) {
566 modseq = mail_index_modseq_lookup(ibox->view, seq); 567 modseq = mail_index_modseq_lookup(ibox->view, seq);