diff options
author | jcid <devnull@localhost> | 2007-12-05 16:39:22 +0100 |
---|---|---|
committer | jcid <devnull@localhost> | 2007-12-05 16:39:22 +0100 |
commit | 128f4f70c67071351e7d1312bc762978fc2d0bcb (patch) | |
tree | 35ee0590ac99188233999f78706afd771f5d59e2 | |
parent | d4aeaaf1c3460102a1318862718f53038c770984 (diff) |
Added a workaround for a CCC reentrancy segfault.
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/IO/IO.c | 11 |
2 files changed, 10 insertions, 2 deletions
@@ -42,6 +42,7 @@ dillo-fltk2 - Switched UI shortcuts from a global event handler to UI::handle. - Bound Ctrl+Space to toggle fullscreen mode. - Switched dillo to push a URL with fragment (anchor) into the stack. + - Added a workaround for a CCC reentrancy segfault. Patches: Jorge Arellano Cid +- Connected signals to <li> elements (fixes links within lists). - Enabled text, background-color and geometry in preferences. diff --git a/src/IO/IO.c b/src/IO/IO.c index 5e984ed8..335b4378 100644 --- a/src/IO/IO.c +++ b/src/IO/IO.c @@ -158,6 +158,7 @@ static bool_t IO_read(IOData_t *io) char Buf[IOBufLen]; ssize_t St; bool_t ret = FALSE; + int io_key = io->Key; DEBUG_MSG(3, " IO_read\n"); @@ -190,8 +191,14 @@ static bool_t IO_read(IOData_t *io) a_IO_ccc(OpSend, 2, FWD, io->Info, io, NULL); } if (St == 0) { - /* All data read (EOF) */ - a_IO_ccc(OpEnd, 2, FWD, io->Info, io, NULL); + /* TODO: design a general way to avoid reentrancy problems with CCC. */ + + /* The following check is necessary because the above CCC operation + * may abort the whole Chain. */ + if ((io = IO_get(io_key))) { + /* All data read (EOF) */ + a_IO_ccc(OpEnd, 2, FWD, io->Info, io, NULL); + } } return ret; } |