113 |
|
++to->localClient->send.messages; |
114 |
|
++me.localClient->send.messages; |
115 |
|
|
116 |
< |
if (dbuf_length(&to->localClient->buf_sendq) > |
117 |
< |
(IsServer(to) ? (unsigned int) 1024 : (unsigned int) 4096)) |
118 |
< |
send_queued_write(to); |
116 |
> |
send_queued_write(to); |
117 |
|
} |
118 |
|
|
119 |
|
/* send_message_remote() |
191 |
|
void |
192 |
|
sendq_unblocked(fde_t *fd, struct Client *client_p) |
193 |
|
{ |
194 |
< |
ClearSendqBlocked(client_p); |
195 |
< |
/* let send_queued_write be executed by send_queued_all */ |
198 |
< |
|
199 |
< |
#ifdef HAVE_LIBCRYPTO |
200 |
< |
if (fd->flags.pending_read) |
201 |
< |
{ |
202 |
< |
fd->flags.pending_read = 0; |
203 |
< |
read_packet(fd, client_p); |
204 |
< |
} |
205 |
< |
#endif |
194 |
> |
assert(fd == &client_p->localClient->fd); |
195 |
> |
send_queued_write(client_p); |
196 |
|
} |
197 |
|
|
198 |
|
/* |
211 |
|
** Once socket is marked dead, we cannot start writing to it, |
212 |
|
** even if the error is removed... |
213 |
|
*/ |
214 |
< |
if (IsDead(to) || IsSendqBlocked(to)) |
214 |
> |
if (IsDead(to)) |
215 |
|
return; /* no use calling send() now */ |
216 |
|
|
217 |
|
/* Next, lets try to write some data */ |
262 |
|
if ((retlen < 0) && (ignoreErrno(errno))) |
263 |
|
{ |
264 |
|
/* we have a non-fatal error, reschedule a write */ |
275 |
– |
SetSendqBlocked(to); |
265 |
|
comm_setselect(&to->localClient->fd, COMM_SELECT_WRITE, |
266 |
|
(PF *)sendq_unblocked, to, 0); |
267 |
|
} |