Hi,
could anyone explain what problems can arise, if BUFSIZE is
increased?
#define BUFSIZE 512 /* WARNING: *DONT* CHANGE THIS!!!! */
One application (not related to any IRC network) I have would
require support for IRC messages of up to 4KB, so I increased
this limit and fixed the two or three spots in the code which
have BUFSIZE-2 hardcoded. From what I can tell, the IRC
server seems to be doing fine..
If anyone can fill in this gap, it would be appreciated.
- Sascha Experience IRCG
http://schumann.cx/ http://schumann.cx/ircg
diff -ur ircu2.10/ircd/s_bsd.c ircu2.10-longmsg/ircd/s_bsd.c
--- ircu2.10/ircd/s_bsd.c Sun Jun 10 00:45:37 2001
+++ ircu2.10-longmsg/ircd/s_bsd.c Fri Nov 9 17:07:42 2001
@@ -717,7 +718,7 @@
* -avalon
*/
if (0 == dolen) {
- if (DBufLength(&cptr->recvQ) < 510)
+ if (DBufLength(&cptr->recvQ) < BUFSIZE - 2)
cptr->flags |= FLAGS_NONL;
else
DBufClear(&cptr->recvQ);
diff -ur ircu2.10/ircd/send.c ircu2.10-longmsg/ircd/send.c
--- ircu2.10/ircd/send.c Wed Aug 29 22:01:20 2001
+++ ircu2.10-longmsg/ircd/send.c Fri Nov 9 17:08:06 2001
@@ -239,8 +239,8 @@
len = strlen(buf);
if (buf[len - 1] != '\n') {
- if (len > 510)
- len = 510;
+ if (len > BUFSIZE - 2)
+ len = BUFSIZE - 2;
buf[len++] = '\r';
buf[len++] = '\n';
buf[len] = '\0';