X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/54015b5fea2584a35aa605ebe37217010b448cff..90a3c35b295b07ebe3793bf5d3b882c3c1a5dc7c:/src/packet.c?ds=sidebyside diff --git a/src/packet.c b/src/packet.c index 5e06c80..bc1a0f5 100644 --- a/src/packet.c +++ b/src/packet.c @@ -24,8 +24,6 @@ * $Id: packet.c 3446 2007-05-14 22:21:16Z jilles $ */ #include "stdinc.h" -#include "tools.h" -#include "commio.h" #include "s_conf.h" #include "s_serv.h" #include "client.h" @@ -34,7 +32,6 @@ #include "parse.h" #include "packet.h" #include "irc_string.h" -#include "memory.h" #include "hook.h" #include "send.h" @@ -204,7 +201,7 @@ flood_recalc(int fd, void *data) return; /* and finally, reset the flood check */ - comm_setflush(fd, 1000, flood_recalc, client_p); + rb_setflush(fd, 1000, flood_recalc, client_p); } /* @@ -322,7 +319,7 @@ read_ctrl_packet(int fd, void *data) /* reset SlinkRpl */ if(reply->datalen > 0) - MyFree(reply->data); + rb_free(reply->data); reply->command = 0; if(IsAnyDead(server)) @@ -330,7 +327,7 @@ read_ctrl_packet(int fd, void *data) nodata: /* If we get here, we need to register for another COMM_SELECT_READ */ - comm_setselect(fd, FDLIST_SERVER, COMM_SELECT_READ, read_ctrl_packet, server, 0); + rb_setselect(fd, FDLIST_SERVER, COMM_SELECT_READ, read_ctrl_packet, server, 0); } /* @@ -356,13 +353,13 @@ read_packet(int fd, void *data) * I personally think it makes the code too hairy to make sane. * -- adrian */ - length = read(client_p->localClient->fd, readBuf, READBUF_SIZE); + length = client_p->localClient->F->read_impl(client_p->localClient->F, readBuf, READBUF_SIZE); if(length <= 0) { if((length == -1) && ignoreErrno(errno)) { - comm_setselect(client_p->localClient->fd, FDLIST_IDLECLIENT, + rb_setselect(client_p->localClient->F->fd, FDLIST_IDLECLIENT, COMM_SELECT_READ, read_packet, client_p, 0); return; } @@ -416,12 +413,12 @@ read_packet(int fd, void *data) /* If we get here, we need to register for another COMM_SELECT_READ */ if(PARSE_AS_SERVER(client_p)) { - comm_setselect(client_p->localClient->fd, FDLIST_SERVER, COMM_SELECT_READ, + rb_setselect(client_p->localClient->F->fd, FDLIST_SERVER, COMM_SELECT_READ, read_packet, client_p, 0); } else { - comm_setselect(client_p->localClient->fd, FDLIST_IDLECLIENT, + rb_setselect(client_p->localClient->F->fd, FDLIST_IDLECLIENT, COMM_SELECT_READ, read_packet, client_p, 0); } }