CtdlDeleteMessages() now uses the bulk API CtdlCopyMsgsToRoom()
authorArt Cancro <ajc@citadel.org>
Thu, 27 Jul 2006 04:21:07 +0000 (04:21 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 27 Jul 2006 04:21:07 +0000 (04:21 +0000)
to move deleted messages to the __CtdlDeletedMessages__ room.  The next
step will be to make CtdlDeleteMessages() itself a bulk-move API.

citadel/msgbase.c

index c127162b9a5c5e97b1a09015180cb7368209e70c..3934cd290b29789e5240b099839334a2586c1c91 100644 (file)
@@ -3370,11 +3370,11 @@ int CtdlDeleteMessages(char *room_name,         /* which room */
         * DELETED_MSGS_ROOM.  This will cause the reference count to remain
         * at least 1, which will save the user from having to synchronously
         * wait for various disk-intensive operations to complete.
+        *
+        * Slick -- we now use the new bulk API for moving messages.
         */
        if ( (deferred) && (num_deleted) ) {
-               for (i=0; i<num_deleted; ++i) {
-                       CtdlCopyMsgToRoom(dellist[i], DELETED_MSGS_ROOM);
-               }
+               CtdlCopyMsgsToRoom(dellist, num_deleted, DELETED_MSGS_ROOM);
        }
 
        /* Go through the messages we pulled out of the index, and decrement