]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/packet.c
Argh, wrong replace caused by MS VS 2005 interface.
[irc/rqf/shadowircd.git] / src / packet.c
index 5e06c80318ab8ccb41e218aa249bf3873ce60962..bc1a0f5651956efa3407c02d70a6dfbd346557a9 100644 (file)
@@ -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);
        }
 }