summaryrefslogtreecommitdiff
path: root/src/lib/eldbus
diff options
context:
space:
mode:
authorCedric Bail <cedric@osg.samsung.com>2018-05-02 13:44:01 -0700
committerCedric BAIL <cedric@osg.samsung.com>2018-05-24 16:02:18 -0700
commit6e078edaa92631ea93543b20c627c08b1fe2887f (patch)
treec69c55d4c8fd611bc8000bb23a88ac1fdd85e18e /src/lib/eldbus
parent71cd44c176690c5704ac635ba536b9dfa2f38d4c (diff)
eldbus: manage death of children during invalidate.
Differential Revision: https://phab.enlightenment.org/D6091
Diffstat (limited to 'src/lib/eldbus')
-rw-r--r--src/lib/eldbus/eldbus_model_connection.c10
-rw-r--r--src/lib/eldbus/eldbus_model_connection.eo2
2 files changed, 5 insertions, 7 deletions
diff --git a/src/lib/eldbus/eldbus_model_connection.c b/src/lib/eldbus/eldbus_model_connection.c
index 28f0242..2af0aff 100644
--- a/src/lib/eldbus/eldbus_model_connection.c
+++ b/src/lib/eldbus/eldbus_model_connection.c
@@ -22,23 +22,21 @@ _eldbus_model_connection_efl_object_constructor(Eo *obj, Eldbus_Model_Connection
22} 22}
23 23
24static void 24static void
25_eldbus_model_connection_efl_object_destructor(Eo *obj, Eldbus_Model_Connection_Data *pd) 25_eldbus_model_connection_efl_object_invalidate(Eo *obj, Eldbus_Model_Connection_Data *pd)
26{ 26{
27 Eldbus_Children_Slice_Promise *slice; 27 Eldbus_Children_Slice_Promise *slice;
28 Eo *child;
29 28
30 if (pd->pending) eldbus_pending_cancel(pd->pending); 29 if (pd->pending) eldbus_pending_cancel(pd->pending);
31 30
32 EINA_LIST_FREE(pd->childrens, child)
33 efl_del(child);
34
35 EINA_LIST_FREE(pd->requests, slice) 31 EINA_LIST_FREE(pd->requests, slice)
36 { 32 {
37 eina_promise_reject(slice->p, EFL_MODEL_ERROR_UNKNOWN); 33 eina_promise_reject(slice->p, EFL_MODEL_ERROR_UNKNOWN);
38 free(slice); 34 free(slice);
39 } 35 }
40 36
41 efl_destructor(efl_super(obj, ELDBUS_MODEL_CONNECTION_CLASS)); 37 pd->childrens = eina_list_free(pd->childrens);
38
39 efl_invalidate(efl_super(obj, ELDBUS_MODEL_CONNECTION_CLASS));
42} 40}
43 41
44static void 42static void
diff --git a/src/lib/eldbus/eldbus_model_connection.eo b/src/lib/eldbus/eldbus_model_connection.eo
index 5b392ab..d064027 100644
--- a/src/lib/eldbus/eldbus_model_connection.eo
+++ b/src/lib/eldbus/eldbus_model_connection.eo
@@ -3,7 +3,7 @@ class Eldbus.Model.Connection (Eldbus.Model) {
3 3
4 implements { 4 implements {
5 Efl.Object.constructor; 5 Efl.Object.constructor;
6 Efl.Object.destructor; 6 Efl.Object.invalidate;
7 Efl.Model.children_slice_get; 7 Efl.Model.children_slice_get;
8 Efl.Model.children_count { get; } 8 Efl.Model.children_count { get; }
9 } 9 }