summaryrefslogtreecommitdiff
path: root/src/lib/ecore_con
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
parentb4f8315e1a3bc3d18f4fc55a33daa7a74ef75fa9 (diff)
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 'src/lib/ecore_con')
-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 dab8c7f..2ccec1d 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
371} 371}
372 372
373static void 373static void
374_efl_net_control_technology_scan_promise_del(void *data EINA_UNUSED, Efl_Loop_Consumer *consumer, const Eina_Promise *dead_ptr) 374_efl_net_control_technology_scan_promise_del(void *data EINA_UNUSED, Efl_Loop_Consumer *consumer EINA_UNUSED, const Eina_Promise *dead_ptr)
375{ 375{
376 Eldbus_Pending *p = consumer; 376 Eldbus_Pending *p;
377 Efl_Net_Control_Technology_Data *pd; 377 Efl_Net_Control_Technology_Data *pd;
378 Eo *o; 378 Eo *o;
379 379
380 if (!p) return; 380 p = eina_promise_data_get(dead_ptr);
381 if (!p) return; /* already gone, nothing to do */
381 382
382 o = eldbus_pending_data_get(p, ".object"); 383 o = eldbus_pending_data_get(p, ".object");
383 pd = efl_data_scope_get(o, MY_CLASS); 384 pd = efl_data_scope_get(o, MY_CLASS);
384 385
385 EINA_SAFETY_ON_NULL_RETURN(pd); 386 EINA_SAFETY_ON_NULL_RETURN(pd);
386 387
387 p = eina_promise_data_get(dead_ptr);
388 if (!p) return; /* already gone, nothing to do */
389
390 pd->pending = eina_list_remove(pd->pending, p); 388 pd->pending = eina_list_remove(pd->pending, p);
391 DBG("cancel pending scan %p", p); 389 DBG("cancel pending scan %p", p);
392 eldbus_pending_cancel(p); 390 eldbus_pending_cancel(p);