summaryrefslogtreecommitdiff
path: root/src/lib/eio
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-08-30 12:43:24 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-08-30 12:43:24 +0100
commitd6156d23d8fb2f02b4582da714b8b0ba089fe36a (patch)
tree824b07afac981572f2d84255834fefcc49e97e1d /src/lib/eio
parent0e82fa3f40b8998ad60d38f904ea89e04b8ccb15 (diff)
eio - don't call cb's after a cancel
i saw a segv in e/efm .. an eio call was called after it had been canceled. this should never happen. ever. so ensure it does not once an eio file has been canceled. @fix
Diffstat (limited to 'src/lib/eio')
-rw-r--r--src/lib/eio/eio_file.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/eio/eio_file.c b/src/lib/eio/eio_file.c
index 7a46e9b..d66b035 100644
--- a/src/lib/eio/eio_file.c
+++ b/src/lib/eio/eio_file.c
@@ -739,6 +739,12 @@ eio_file_cancel(Eio_File *ls)
739{ 739{
740 if (!ls) return EINA_FALSE; 740 if (!ls) return EINA_FALSE;
741 EINA_SAFETY_ON_NULL_RETURN_VAL(ls, EINA_FALSE); 741 EINA_SAFETY_ON_NULL_RETURN_VAL(ls, EINA_FALSE);
742 // ensure callbacks are not called aftera cancel otherwise bad things
743 // happen higher up the stack - you cant stop these being caleld even if
744 // the dataptr they are passed has been freed or invalidated. being unable
745 // to stop future cb's and cancel them is BAD.
746 ls->error_cb = NULL;;
747 ls->done_cb = NULL;
742 return ecore_thread_cancel(ls->thread); 748 return ecore_thread_cancel(ls->thread);
743} 749}
744 750