diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-01-08 23:42:08 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-01-08 23:42:08 +0000 |
commit | 7b3475368a1950d2adc638bdc4d0bbda4b3d1e18 (patch) | |
tree | d1fc1d203654943e09491f7f094bf78cf30801c8 /src/buffio.c | |
parent | 5565b244c983bfbfd8b88077eda690fd630e3f1f (diff) |
made ivamd a real daemon
git-svn-id: file:///home/lennart/svn/public/ivam2/trunk@20 dbf6933d-3bce-0310-9bcc-ed052ba35b35
Diffstat (limited to 'src/buffio.c')
-rw-r--r-- | src/buffio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/buffio.c b/src/buffio.c index 95e3dec..4771b1c 100644 --- a/src/buffio.c +++ b/src/buffio.c @@ -257,6 +257,7 @@ static void do_read(struct buffio *b) { m = b->input_max_length-i; s = read(b->ifd, b->input_buf+i, m); + buffio_set_readable(b, 0); //daemon_log(LOG_INFO, "%p: Read %u (%u) bytes.", b, s, m); if (s < 0) { @@ -284,8 +285,6 @@ static void do_read(struct buffio *b) { b->input_length += s; buffio_normalize(b); - buffio_set_readable(b, 0); - if (b->input_length) buffio_sched_cb(b, BUFFIO_SCHED_CB_INPUT_READY); } @@ -310,6 +309,8 @@ static void do_write(struct buffio *b) { m = b->output_max_length-b->output_index; s = write(b->ofd, b->output_buf+b->output_index, m); + buffio_set_writable(b, 0); + //daemon_log(LOG_INFO, "%p: Wrote %u (%u) bytes.", b, s, m); if (s < 0) { @@ -338,7 +339,6 @@ static void do_write(struct buffio *b) { b->output_length -= s; buffio_normalize(b); - buffio_set_writable(b, 0); buffio_delay(b, s); if (b->output_length < b->output_range) |