diff options
author | jcid <devnull@localhost> | 2008-05-17 03:00:04 +0200 |
---|---|---|
committer | jcid <devnull@localhost> | 2008-05-17 03:00:04 +0200 |
commit | 907df0d21b68efd17f176d883a5d857d571237c6 (patch) | |
tree | c975f8b5721cd0902c9dab07177b2ce7e664826b /src/IO/IO.c | |
parent | 42a48c329bdaa79d3a92951912f1174b7bc5035c (diff) |
- CCC: added reentrancy control to the OpEnd and OpAbort operations.
- CCC: enhanced the debug function and implemented OpAbort for dpi.
Diffstat (limited to 'src/IO/IO.c')
-rw-r--r-- | src/IO/IO.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/IO/IO.c b/src/IO/IO.c index f87f32e0..db3239a6 100644 --- a/src/IO/IO.c +++ b/src/IO/IO.c @@ -137,7 +137,7 @@ static void IO_close_fd(IOData_t *io, int CloseCode) int st; int events = 0; - _MSG("====> begin IO close (%d) Key=%d CloseCode=%d Flags=%d ", + _MSG("====> begin IO_close_fd (%d) Key=%d CloseCode=%d Flags=%d ", io->FD, io->Key, CloseCode, io->Flags); /* With HTTP, if we close the writing part, the reading one also gets @@ -157,11 +157,9 @@ static void IO_close_fd(IOData_t *io, int CloseCode) if (CloseCode & IO_StopRd) { events |= DIO_READ; } - if (CloseCode & IO_StopWr) { events |= DIO_WRITE; } - a_IOwatch_remove_fd(io->FD, events); _MSG(" end IO close (%d) <=====\n", io->FD); } @@ -213,6 +211,7 @@ static bool_t IO_read(IOData_t *io) * may abort the whole Chain. */ if ((io = IO_get(io_key))) { /* All data read (EOF) */ + _MSG("IO_read: io->Key=%d io_key=%d\n", io->Key, io_key); a_IO_ccc(OpEnd, 2, FWD, io->Info, io, NULL); } } @@ -349,7 +348,7 @@ void a_IO_ccc(int Op, int Branch, int Dir, ChainLink *Info, IOData_t *io; DataBuf *dbuf; - a_Chain_debug_msg("a_IO_ccc", Op, Branch, Dir); + dReturn_if_fail( a_Chain_check("a_IO_ccc", Op, Branch, Dir, Info) ); if (Branch == 1) { if (Dir == BCK) { @@ -421,7 +420,7 @@ void a_IO_ccc(int Op, int Branch, int Dir, ChainLink *Info, break; case OpEnd: a_Chain_fcb(OpEnd, Info, NULL, NULL); - IO_close_fd(io, IO_StopRdWr); + IO_close_fd(io, IO_StopRdWr); /* IO_StopRd would leak FDs */ IO_free(io); dFree(Info); break; |