aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_con/efl_net_control_technology-connman.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-01-11 10:31:16 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-01-12 01:52:38 +0000
commit1e6d77af9062b263dd25f83ba7c2cf1d089af508 (patch)
treef8af80f14c9d78ad532bf7ad5efb0eced6c81294 /src/lib/ecore_con/efl_net_control_technology-connman.c
parentelementary: Add missing EINA_UNUSED for efl_ui_image_factory_connect (diff)
downloadefl-1e6d77af9062b263dd25f83ba7c2cf1d089af508.tar.gz
efl net - connman - fix correct param for promise cancel
the consumer is the obj and the obj is not the pending - it is the promise data, so warning pointed out an actual bug waiting to happen.
Diffstat (limited to '')
-rw-r--r--src/lib/ecore_con/efl_net_control_technology-connman.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/ecore_con/efl_net_control_technology-connman.c b/src/lib/ecore_con/efl_net_control_technology-connman.c
index dab8c7f5b6..2ccec1d983 100644
--- a/src/lib/ecore_con/efl_net_control_technology-connman.c
+++ b/src/lib/ecore_con/efl_net_control_technology-connman.c
@@ -371,22 +371,20 @@ _efl_net_control_technology_scan_cb(void *data, const Eldbus_Message *msg, Eldbu
}
static void
-_efl_net_control_technology_scan_promise_del(void *data EINA_UNUSED, Efl_Loop_Consumer *consumer, const Eina_Promise *dead_ptr)
+_efl_net_control_technology_scan_promise_del(void *data EINA_UNUSED, Efl_Loop_Consumer *consumer EINA_UNUSED, const Eina_Promise *dead_ptr)
{
- Eldbus_Pending *p = consumer;
+ Eldbus_Pending *p;
Efl_Net_Control_Technology_Data *pd;
Eo *o;
- if (!p) return;
+ p = eina_promise_data_get(dead_ptr);
+ if (!p) return; /* already gone, nothing to do */
o = eldbus_pending_data_get(p, ".object");
pd = efl_data_scope_get(o, MY_CLASS);
EINA_SAFETY_ON_NULL_RETURN(pd);
- p = eina_promise_data_get(dead_ptr);
- if (!p) return; /* already gone, nothing to do */
-
pd->pending = eina_list_remove(pd->pending, p);
DBG("cancel pending scan %p", p);
eldbus_pending_cancel(p);