diff --git a/include/common.h b/include/common.h index b96cb0f..d5cd0c3 100644 --- a/include/common.h +++ b/include/common.h @@ -64,5 +64,8 @@ /* Right out of the RFC */ #define IRCD_BUFSIZE 512 + +/* readbuf size */ +#define READBUF_SIZE 16384 #endif /* INCLUDED_common_h */ diff --git a/src/packet.c b/src/packet.c index d8afef0..6d203a1 100644 --- a/src/packet.c +++ b/src/packet.c @@ -58,7 +58,7 @@ parse_client_queued(struct Client *client_p) if(client_p->localClient->sent_parsed >= client_p->localClient->allow_read) break; - dolen = linebuf_get(&client_p->localClient-> + dolen = rb_linebuf_get(&client_p->localClient-> buf_recvq, readBuf, READBUF_SIZE, LINEBUF_COMPLETE, LINEBUF_PARSED); @@ -88,7 +88,7 @@ parse_client_queued(struct Client *client_p) if(IsAnyServer(client_p) || IsExemptFlood(client_p)) { - while (!IsAnyDead(client_p) && (dolen = linebuf_get(&client_p->localClient->buf_recvq, + while (!IsAnyDead(client_p) && (dolen = rb_linebuf_get(&client_p->localClient->buf_recvq, readBuf, READBUF_SIZE, LINEBUF_COMPLETE, LINEBUF_PARSED)) > 0) { @@ -132,7 +132,7 @@ parse_client_queued(struct Client *client_p) else if(client_p->localClient->sent_parsed >= (4 * client_p->localClient->allow_read)) break; - dolen = linebuf_get(&client_p->localClient-> + dolen = rb_linebuf_get(&client_p->localClient-> buf_recvq, readBuf, READBUF_SIZE, LINEBUF_COMPLETE, LINEBUF_PARSED); @@ -386,7 +386,7 @@ read_packet(int fd, void *data) if(IsHandshake(client_p) || IsUnknown(client_p)) binary = 1; - lbuf_len = linebuf_parse(&client_p->localClient->buf_recvq, readBuf, length, binary); + lbuf_len = rb_linebuf_parse(&client_p->localClient->buf_recvq, readBuf, length, binary); lclient_p->actually_read += lbuf_len; @@ -401,7 +401,7 @@ read_packet(int fd, void *data) /* Check to make sure we're not flooding */ if(!IsAnyServer(client_p) && - (linebuf_alloclen(&client_p->localClient->buf_recvq) > ConfigFileEntry.client_flood)) + (rb_linebuf_alloclen(&client_p->localClient->buf_recvq) > ConfigFileEntry.client_flood)) { if(!(ConfigFileEntry.no_oper_flood && IsOper(client_p))) {