]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_imap.c
* Full text indexer is now switchable on/off
[citadel.git] / citadel / serv_imap.c
index 7b9ce5074efa61ce07ef921fda1b842621292f69..c4bd19dd7ece64eb22227b4cfb3036968403dc20 100644 (file)
@@ -251,7 +251,10 @@ void imap_rescan_msgids(void)
                return;
        }
 
-       /* Check to see if the room's contents have changed.  If not, we can avoid rescan */
+       /*
+        * Check to see if the room's contents have changed.
+        * If not, we can avoid this rescan.
+        */
        getroom(&CC->room, CC->room.QRname);
        if (IMAP->last_mtime == CC->room.QRmtime) {     /* No changes! */
                return;
@@ -291,9 +294,10 @@ void imap_rescan_msgids(void)
                        if (message_still_exists == 0) {
                                cprintf("* %d EXPUNGE\r\n", i + 1);
 
-                               /* Here's some nice stupid nonsense.  When a message
-                                * is expunged, we have to slide all the existing
-                                * messages up in the message array.
+                               /* Here's some nice stupid nonsense.  When a
+                                * message is expunged, we have to slide all
+                                * the existing messages up in the message
+                                * array.
                                 */
                                --IMAP->num_msgs;
                                memcpy(&IMAP->msgids[i],
@@ -323,12 +327,13 @@ void imap_rescan_msgids(void)
        /*
         * Now peruse the room for *new* messages only.
         */
-       if (num_msgs > 0)
+       if (num_msgs > 0) {
                for (j = 0; j < num_msgs; ++j) {
                        if (msglist[j] > original_highest) {
                                imap_add_single_msgid(msglist[j], NULL);
                        }
                }
+       }
        imap_set_seen_flags();
 
        /*
@@ -637,7 +642,7 @@ void imap_select(int num_parms, char *parms[])
        cprintf("* %d EXISTS\r\n", msgs);
        cprintf("* %d RECENT\r\n", new);
 
-       cprintf("* OK [UIDVALIDITY 0] UID validity status\r\n");
+       cprintf("* OK [UIDVALIDITY 1] UID validity status\r\n");
        cprintf("* OK [UIDNEXT %ld] Predicted next UID\r\n", CitControl.MMhighest + 1);
 
        /* Note that \Deleted is a valid flag, but not a permanent flag,
@@ -1184,7 +1189,7 @@ void imap_delete(int num_parms, char *parms[])
         * Now delete the room.
         */
        if (CtdlDoIHavePermissionToDeleteThisRoom(&CC->room)) {
-               delete_room(&CC->room);
+               schedule_room_for_deletion(&CC->room);
                cprintf("%s OK DELETE completed\r\n", parms[0]);
        } else {
                cprintf("%s NO Can't delete this folder.\r\n", parms[0]);