Hey folks,
Regarding edbus, I believe that when sending a message, if it fails to
set_notify, it should cancel and unref the pending message. Another
thing, if the pending call doesn't complete, it should free data and
unref it too, right?
I'm attaching a small patch to fix it.
Please, somebody take a look at that when have some time.
Thanks,
Bruno
Index: src/lib/dbus/e_dbus_message.c
===================================================================
--- src/lib/dbus/e_dbus_message.c (revision 41960)
+++ src/lib/dbus/e_dbus_message.c (working copy)
@@ -19,6 +19,9 @@
if (!dbus_pending_call_get_completed(pending))
{
printf("NOT COMPLETED\n");
+ free(data);
+ dbus_message_unref(msg);
+ dbus_pending_call_unref(pending);
return;
}
@@ -77,7 +80,12 @@
pdata->data = data;
if (!dbus_pending_call_set_notify(pending, cb_pending, pdata, free))
+ {
free(pdata);
+ dbus_message_unref(msg);
+ dbus_pending_call_cancel(pending);
+ return NULL;
+ }
}
return pending;
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel