Commit 018afcde authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(isc_oflush): Inform isc_check_read_callback() if anything was written.

parent f009d8ea
......@@ -100,6 +100,7 @@ isc_oflush(struct isc_scb_internal *scb)
{
struct isc_msg * msg;
int failed;
int any_written;
int wlen;
int loopcnt;
oop_source *src;
......@@ -122,6 +123,7 @@ isc_oflush(struct isc_scb_internal *scb)
/* Queued entries? Send as much as possible */
failed = 0;
loopcnt = 0;
any_written = 0;
while ((msg = isc_topqueue(scb->wr_msg_q)) != NULL &&
!failed && loopcnt < scb->cfg->max.dequeuelen)
{
......@@ -149,6 +151,8 @@ isc_oflush(struct isc_scb_internal *scb)
return;
}
}
else
any_written = 1;
msg->length -= wlen;
if (msg->length > 0)
......@@ -168,7 +172,7 @@ isc_oflush(struct isc_scb_internal *scb)
loopcnt++;
}
isc_check_read_callback(scb);
isc_check_read_callback(scb, any_written);
if (isc_pollqueue(scb->wr_msg_q))
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment