Author: Kev <klmitch@mit.edu>
authorKevin L. Mitchell <klmitch@mit.edu>
Tue, 2 Apr 2002 04:27:36 +0000 (04:27 +0000)
committerKevin L. Mitchell <klmitch@mit.edu>
Tue, 2 Apr 2002 04:27:36 +0000 (04:27 +0000)
Log message:

What a screw case.  In the case of many, many joins, we were overflowing an
array in the joinbuf because we were adding a channel to the array, then
forgetting to empty the array when we flushed--because they weren't
supposed to have been added in the first place!  This should stop them from
being added anymore, and hopefully fix our Amsterdam* crashes.

(pull-up from u2_10_11 branch)

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@697 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/channel.c

index eb38813b9c7a7bee884c1f9ab9fd037b611c8b44..6fb058b38c21c3eabc7bf308989e1a6995d2cc2c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-04-01  Kevin L Mitchell  <klmitch@mit.edu>
+
+       * ircd/channel.c (joinbuf_join): don't add a channel to the list
+       in the joinbuf unless when we flush it, we empty the list
+
 2002-04-02 Andrew Miller <a1kmm@mware.virtualave.net>
        * ircd/ircd_parser.y: Added ircd parser, lexer, to replace the
           old configuration file format.
index 93c4162d637ba6306895f90363f387decb4f2edc..11a0f0219dbe4a7408c7adce76c512ed0f12f8ff 100644 (file)
@@ -3156,7 +3156,8 @@ joinbuf_join(struct JoinBuf *jbuf, struct Channel *chan, unsigned int flags)
                                chan, jbuf->jb_source);
   }
 
-  if (jbuf->jb_type == JOINBUF_TYPE_PARTALL || IsLocalChannel(chan->chname))
+  if (jbuf->jb_type == JOINBUF_TYPE_PARTALL ||
+      jbuf->jb_type == JOINBUF_TYPE_JOIN || IsLocalChannel(chan->chname))
     return; /* don't send to remote */
 
   /* figure out if channel name will cause buffer to be overflowed */