summaryrefslogtreecommitdiff
path: root/legacy/edbus/src/lib/edbus_object.c
diff options
context:
space:
mode:
authorJosé Roberto de Souza <zehortigoza@profusion.mobi>2012-12-20 01:55:34 +0000
committerLucas De Marchi <lucas.demarchi@profusion.mobi>2012-12-20 01:55:34 +0000
commitab93f397a7a388eb560db2466ed7521f22300895 (patch)
treec9981f93b1123ca8feb52cb90da723c49d53716d /legacy/edbus/src/lib/edbus_object.c
parent3f5fa6170c50d9c1c455ed545eca44614730109d (diff)
edbus: Only create one ref of proxys when listen object manager
Patch by: José Roberto de Souza <zehortigoza@profusion.mobi> SVN revision: 81414
Diffstat (limited to '')
-rw-r--r--legacy/edbus/src/lib/edbus_object.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/legacy/edbus/src/lib/edbus_object.c b/legacy/edbus/src/lib/edbus_object.c
index 4227613c68..34c5c0c304 100644
--- a/legacy/edbus/src/lib/edbus_object.c
+++ b/legacy/edbus/src/lib/edbus_object.c
@@ -285,15 +285,14 @@ _cb_interfaces_added(void *data, const EDBus_Message *msg)
285 { 285 {
286 const char *iface_name; 286 const char *iface_name;
287 EDBus_Object_Event_Interface_Added event; 287 EDBus_Object_Event_Interface_Added event;
288 EDBus_Proxy *proxy;
289 288
290 edbus_message_iter_basic_get(entry_iface, &iface_name); 289 edbus_message_iter_basic_get(entry_iface, &iface_name);
291 proxy = edbus_proxy_get(obj, iface_name); 290 event.proxy = edbus_proxy_get(obj, iface_name);
292 EINA_SAFETY_ON_NULL_RETURN(proxy); 291 EINA_SAFETY_ON_NULL_RETURN(event.proxy);
293 event.interface = iface_name; 292 event.interface = iface_name;
294 event.proxy = proxy;
295 _edbus_object_event_callback_call(obj, EDBUS_OBJECT_EVENT_IFACE_ADDED, 293 _edbus_object_event_callback_call(obj, EDBUS_OBJECT_EVENT_IFACE_ADDED,
296 &event); 294 &event);
295 edbus_proxy_unref(event.proxy);
297 } 296 }
298} 297}
299 298
@@ -361,7 +360,7 @@ _cb_properties_changed(void *data, const EDBus_Message *msg)
361 proxy); 360 proxy);
362 361
363 if (!obj->event_handlers[EDBUS_OBJECT_EVENT_PROPERTY_REMOVED].list) 362 if (!obj->event_handlers[EDBUS_OBJECT_EVENT_PROPERTY_REMOVED].list)
364 return; 363 goto end;
365 364
366 while (edbus_message_iter_get_and_next(invalidate, 's', &invalidate_prop)) 365 while (edbus_message_iter_get_and_next(invalidate, 's', &invalidate_prop))
367 { 366 {
@@ -373,6 +372,8 @@ _cb_properties_changed(void *data, const EDBus_Message *msg)
373 EDBUS_OBJECT_EVENT_PROPERTY_REMOVED, 372 EDBUS_OBJECT_EVENT_PROPERTY_REMOVED,
374 &event); 373 &event);
375 } 374 }
375end:
376 edbus_proxy_unref(proxy);
376} 377}
377 378
378EAPI void 379EAPI void