]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/send.c
Remove silly a2client_p, entirely pointless since User.server removal.
[irc/rqf/shadowircd.git] / src / send.c
index bd4adea8e457449c5efccd490a294a6e57ac5c74..c094cdf97d74b4ef89e5898e1b25a930f7460c74 100644 (file)
@@ -108,7 +108,7 @@ _send_linebuf(struct Client *to, buf_head_t *linebuf)
        to->localClient->sendM += 1;
        me.localClient->sendM += 1;
        if(linebuf_len(&to->localClient->buf_sendq) > 0)
-               send_queued_write(to->localClient->fd, to);
+               send_queued_write(to->localClient->F->fd, to);
        return 0;
 }
 
@@ -168,6 +168,10 @@ send_queued_write(int fd, void *data)
 #ifdef USE_IODEBUG_HOOKS
        hook_data_int hd;
 #endif
+       fde_t *F = comm_locate_fd(to->localClient->F->fd);
+       if (!F)
+               return;
+
        /* cant write anything to a dead socket. */
        if(IsIOError(to))
                return;
@@ -182,7 +186,7 @@ send_queued_write(int fd, void *data)
        if(linebuf_len(&to->localClient->buf_sendq))
        {
                while ((retlen =
-                       linebuf_flush(to->localClient->fd, &to->localClient->buf_sendq)) > 0)
+                       linebuf_flush(F, &to->localClient->buf_sendq)) > 0)
                {
                        /* We have some data written .. update counters */
 #ifdef USE_IODEBUG_HOOKS