]> code.citadel.org Git - citadel.git/commitdiff
room_ops.c: added sort_msglist() to move and save operations
authorArt Cancro <ajc@citadel.org>
Tue, 1 Dec 1998 00:17:12 +0000 (00:17 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 1 Dec 1998 00:17:12 +0000 (00:17 +0000)
citadel/ChangeLog
citadel/room_ops.c

index 9ae41e43c9e3b87f7374cd55b34ed5102c91b35a..2167fc00bd7c74183162f7bd5f44269fc7f4a91b 100644 (file)
@@ -1,6 +1,7 @@
 Sun Nov 29 23:57:39 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
        * Fixed cmd_regi() to not display a second result code after xfer
        * Makefile.in: Removed "chmod 4755 citmail netmailer"
+       * room_ops.c: added sort_msglist() to move and save operations
 
 1998-11-23 Nathan Bryant <bryant@cs.usm.maine.edu>
        * citadel.spec: added
index 910cf527fdafe674424ecee165781c824a787f19..3d64b8fe4018829b198690e1c2dbac253eea835d 100644 (file)
@@ -361,6 +361,9 @@ void AddMessageToRoom(struct quickroom *whichroom, long newmsgid) {
 
        msglist[num_msgs - 1] = newmsgid;
 
+       /* Sort the message list, so all the msgid's are in order */
+       num_msgs = sort_msglist(msglist, num_msgs);
+
        /* Write it back to disk. */
        cdb_store(CDB_MSGLISTS, &whichroom->QRnumber, sizeof(long),
                msglist, num_msgs * sizeof(long));