]> code.citadel.org Git - citadel.git/commitdiff
* Wholist fixes for users who are in chat mode
authorArt Cancro <ajc@citadel.org>
Wed, 20 Oct 1999 16:07:50 +0000 (16:07 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 20 Oct 1999 16:07:50 +0000 (16:07 +0000)
citadel/ChangeLog
citadel/citserver.c
citadel/msgbase.c
citadel/sysdep.c

index 0c88877f6ab4b1d699e49fef4e9df8d2b9362a9f..14e2a1cc42a662aa88bfe2a93e415430a1fd6903 100644 (file)
@@ -1,4 +1,7 @@
 $Log$
+Revision 1.389  1999/10/20 16:07:48  ajc
+* Wholist fixes for users who are in chat mode
+
 Revision 1.388  1999/10/20 03:42:29  ajc
 * In the wholist, only show <private room> if the user viewing the list
   doesn't know that room.  Otherwise show the name.
@@ -1328,3 +1331,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
        * Initial CVS import 
+
index 307c7276ca7d035de7b4488d8277d46e4bb63696..30ba3800f0ef405ac77a2a25cef145a393af1f3f 100644 (file)
@@ -572,7 +572,7 @@ void GenerateRoomDisplay(char *real_room,
                while (strlen(real_room) < 14)
                        strcat(real_room, " ");
 
-               strcpy(&real_room[15], "<chat>");
+               strcpy(&real_room[14], "<chat>");
        }
 
 }
index a842b38c327b7cc2783364cc46f3f8c92a577e7c..ffe22b771cc2dc84593f2944df1571f2cfda2c5b 100644 (file)
@@ -1099,7 +1099,7 @@ void cmd_opna(char *cmdbuf)
  * Save a message pointer into a specified room
  * (Returns 0 for success, nonzero for failure)
  */
-int CtdlSaveMsgPointerInRoom(char *roomname, long msgid) {
+int CtdlSaveMsgPointerInRoom(char *roomname, long msgid, int flags) {
        int i;
        struct quickroom qrbuf;
         struct cdbdata *cdbfr;
@@ -1107,7 +1107,8 @@ int CtdlSaveMsgPointerInRoom(char *roomname, long msgid) {
         long *msglist;
         long highest_msg = 0L;
 
-       lprintf(9, "CtdlSaveMsgPointerInRoom(%s, %ld)\n", roomname, msgid);
+       lprintf(9, "CtdlSaveMsgPointerInRoom(%s, %ld, %d)\n",
+               roomname, msgid, flags);
 
        if (lgetroom(&qrbuf, roomname) != 0) {
                lprintf(9, "No such room <%s>\n", roomname);
@@ -1362,10 +1363,6 @@ int ReplicationChecks(struct CtdlMessage *msg) {
 
 
 
-
-
-
-
 /*
  * Save a message to disk
  */
@@ -1505,7 +1502,7 @@ void CtdlSaveMsg(struct CtdlMessage *msg, /* message to save */
                if (strlen(force_room) > 0) {
                        strcpy(actual_rm, force_room);
                }
-               CtdlSaveMsgPointerInRoom(actual_rm, newmsgid);
+               CtdlSaveMsgPointerInRoom(actual_rm, newmsgid, 0);
        }
 
        /* Bump this user's messages posted counter. */
@@ -1519,7 +1516,7 @@ void CtdlSaveMsg(struct CtdlMessage *msg, /* message to save */
        if ((strlen(recipient) > 0) && (mailtype == MES_LOCAL)) {
                if (getuser(&userbuf, recipient) == 0) {
                        MailboxName(actual_rm, &userbuf, MAILROOM);
-                       CtdlSaveMsgPointerInRoom(actual_rm, newmsgid);
+                       CtdlSaveMsgPointerInRoom(actual_rm, newmsgid, 0);
                }
        }
 
@@ -2063,7 +2060,7 @@ void cmd_move(char *args)
 
        if (foundit) {
                /* put the message into the target room */
-               if (err = CtdlSaveMsgPointerInRoom(targ, num), (err !=0) ) {
+               if (err = CtdlSaveMsgPointerInRoom(targ, num, 0), (err !=0) ) {
                        cprintf("%d Could not save message %ld in %s.\n",
                                err, num, targ);
                }
index 2a74ce9cb16f7139d274673f9efd447787219941..8c9a12b212ab33f692db035c152d2ec21d3ae15b 100644 (file)
@@ -99,7 +99,11 @@ void *tracked_malloc(size_t tsize, char *tfile, int tline) {
        struct TheHeap *hptr;
 
        ptr = malloc(tsize);
-       if (ptr == NULL) return(NULL);
+       if (ptr == NULL) {
+               lprintf(3, "DANGER!  mallok(%d) at %s:%d failed!\n",
+                       tsize, tfile, tline);
+               return(NULL);
+       }
 
        hptr = (struct TheHeap *) malloc(sizeof(struct TheHeap));
        strcpy(hptr->h_file, tfile);