diff options
author | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2014-01-20 17:16:43 +0000 |
---|---|---|
committer | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2014-01-20 17:16:43 +0000 |
commit | 2bd268f2cd19f681ad894c9b1ddd35f0a2e2883c (patch) | |
tree | e6994943cfab43bb4e1b98ae8f0ec2da02b6fb88 /src/send.c | |
parent | 6d58ca782efa1f07c17c66d7b870b08b85527030 (diff) |
- Use the i/o subsystem to execute scheduled writes. Patch provided by Adam.
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@2882 82007160-df01-0410-b94d-b575c5fd34c7
Diffstat (limited to 'src/send.c')
-rw-r--r-- | src/send.c | 19 |
1 files changed, 4 insertions, 15 deletions
@@ -113,9 +113,7 @@ send_message(struct Client *to, char *buf, int len) ++to->localClient->send.messages; ++me.localClient->send.messages; - if (dbuf_length(&to->localClient->buf_sendq) > - (IsServer(to) ? (unsigned int) 1024 : (unsigned int) 4096)) - send_queued_write(to); + send_queued_write(to); } /* send_message_remote() @@ -193,16 +191,8 @@ send_message_remote(struct Client *to, struct Client *from, void sendq_unblocked(fde_t *fd, struct Client *client_p) { - ClearSendqBlocked(client_p); - /* let send_queued_write be executed by send_queued_all */ - -#ifdef HAVE_LIBCRYPTO - if (fd->flags.pending_read) - { - fd->flags.pending_read = 0; - read_packet(fd, client_p); - } -#endif + assert(fd == &client_p->localClient->fd); + send_queued_write(client_p); } /* @@ -221,7 +211,7 @@ send_queued_write(struct Client *to) ** Once socket is marked dead, we cannot start writing to it, ** even if the error is removed... */ - if (IsDead(to) || IsSendqBlocked(to)) + if (IsDead(to)) return; /* no use calling send() now */ /* Next, lets try to write some data */ @@ -272,7 +262,6 @@ send_queued_write(struct Client *to) if ((retlen < 0) && (ignoreErrno(errno))) { /* we have a non-fatal error, reschedule a write */ - SetSendqBlocked(to); comm_setselect(&to->localClient->fd, COMM_SELECT_WRITE, (PF *)sendq_unblocked, to, 0); } |