Enlightenment CVS committal
Author : rephorm
Project : e17
Module : proto
Dir : e17/proto/e_dbus/src/lib/hal
Modified Files:
e_hal_device.c e_hal_manager.c
Log Message:
don't leak
remove aclocal.m4 from cvs
add test client
===================================================================
RCS file: /cvs/e/e17/proto/e_dbus/src/lib/hal/e_hal_device.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- e_hal_device.c 22 Mar 2007 01:44:13 -0000 1.3
+++ e_hal_device.c 22 Mar 2007 19:52:59 -0000 1.4
@@ -62,11 +62,14 @@
{
E_Hal_Callback *cb;
DBusMessage *msg;
+ int ret;
cb = e_hal_callback_new(cb_func, data);
msg = e_hal_device_call_new(udi, "GetProperty");
dbus_message_append_args(msg, DBUS_TYPE_STRING, &property,
DBUS_TYPE_INVALID);
- return e_dbus_message_send(conn, msg, cb_device_get_property, -1, cb) ? 1 :
0;
+ ret = e_dbus_message_send(conn, msg, cb_device_get_property, -1, cb) ? 1 : 0;
+ dbus_message_unref(msg);
+ return ret;
}
/* Device.GetAllProperties */
@@ -174,10 +177,13 @@
{
E_Hal_Callback *cb;
DBusMessage *msg;
+ int ret;
cb = e_hal_callback_new(cb_func, data);
msg = e_hal_device_call_new(udi, "GetAllProperties");
- return e_dbus_message_send(conn, msg, cb_device_get_all_properties, -1, cb)
? 1 : 0;
+ ret = e_dbus_message_send(conn, msg, cb_device_get_all_properties, -1, cb) ?
1 : 0;
+ dbus_message_unref(msg);
+ return ret;
}
@@ -221,11 +227,14 @@
{
E_Hal_Callback *cb;
DBusMessage *msg;
+ int ret;
cb = e_hal_callback_new(cb_func, data);
msg = e_hal_device_call_new(udi, "QueryCapability");
dbus_message_append_args(msg, DBUS_TYPE_STRING, &capability,
DBUS_TYPE_INVALID);
- return e_dbus_message_send(conn, msg, cb_device_query_capability, -1, cb) ?
1 : 0;
+ ret = e_dbus_message_send(conn, msg, cb_device_query_capability, -1, cb) ? 1
: 0;
+ dbus_message_unref(msg);
+ return ret;
}
@@ -261,6 +270,7 @@
E_Hal_Callback *cb;
DBusMessage *msg;
DBusMessageIter iter, subiter;
+ int ret;
cb = e_hal_callback_new(cb_func, data);
msg = e_hal_device_volume_call_new(udi, "Mount");
@@ -281,7 +291,9 @@
}
dbus_message_iter_close_container(&iter, &subiter) ;
- return e_dbus_message_send(conn, msg, cb_device_volume_mount, -1, cb) ? 1 :
0;
+ ret = e_dbus_message_send(conn, msg, cb_device_volume_mount, -1, cb) ? 1 : 0;
+ dbus_message_unref(msg);
+ return ret;
}
/* void Unmount(array{string} options) */
@@ -314,6 +326,7 @@
E_Hal_Callback *cb;
DBusMessage *msg;
DBusMessageIter iter, subiter;
+ int ret;
cb = e_hal_callback_new(cb_func, data);
msg = e_hal_device_volume_call_new(udi, "Unmount");
@@ -331,5 +344,7 @@
}
dbus_message_iter_close_container(&iter, &subiter) ;
- return e_dbus_message_send(conn, msg, cb_device_volume_unmount, -1, cb) ? 1
: 0;
+ ret = e_dbus_message_send(conn, msg, cb_device_volume_unmount, -1, cb) ? 1 :
0;
+ dbus_message_unref(msg);
+ return ret;
}
===================================================================
RCS file: /cvs/e/e17/proto/e_dbus/src/lib/hal/e_hal_manager.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- e_hal_manager.c 22 Mar 2007 01:44:13 -0000 1.3
+++ e_hal_manager.c 22 Mar 2007 19:52:59 -0000 1.4
@@ -56,12 +56,15 @@
{
E_Hal_Callback *cb;
DBusMessage *msg;
+ int ret;
if (!cb_func) return 0;
cb = e_hal_callback_new(cb_func, data);
msg = e_hal_manager_call_new("GetAllDevices");
/* add params here (for method calls that have them) */
- return e_dbus_message_send(conn, msg, cb_manager_get_all_devices, -1, cb) ?
1 : 0;
+ ret = e_dbus_message_send(conn, msg, cb_manager_get_all_devices, -1, cb) ? 1
: 0;
+ dbus_message_unref(msg);
+ return ret;
}
/* Manager.DeviceExists(string udi) */
@@ -101,12 +104,15 @@
e_hal_manager_device_exists(E_DBus_Connection *conn, const char *udi,
E_Hal_Callback_Func cb_func, void *data)
{
E_Hal_Callback *cb;
+ int ret;
DBusMessage *msg;
cb = e_hal_callback_new(cb_func, data);
msg = e_hal_manager_call_new("DeviceExists");
dbus_message_append_args(msg, DBUS_TYPE_STRING, &udi, DBUS_TYPE_INVALID);
- return e_dbus_message_send(conn, msg, cb_manager_device_exists, -1, cb) ? 1
: 0;
+ ret = e_dbus_message_send(conn, msg, cb_manager_device_exists, -1, cb) ? 1 :
0;
+ dbus_message_unref(msg);
+ return ret;
}
/* Manager.FindDeviceStringMatch */
@@ -154,11 +160,14 @@
{
E_Hal_Callback *cb;
DBusMessage *msg;
+ int ret;
cb = e_hal_callback_new(cb_func, data);
msg = e_hal_manager_call_new("FindDeviceStringMatch");
dbus_message_append_args(msg, DBUS_TYPE_STRING, &key, DBUS_TYPE_STRING,
&value, DBUS_TYPE_INVALID);
- return e_dbus_message_send(conn, msg, cb_manager_find_device_string_match,
-1, cb) ? 1 : 0;
+ ret = e_dbus_message_send(conn, msg, cb_manager_find_device_string_match,
-1, cb) ? 1 : 0;
+ dbus_message_unref(msg);
+ return ret;
}
/* Manager.FindDeviceByCapability */
@@ -206,9 +215,12 @@
{
E_Hal_Callback *cb;
DBusMessage *msg;
+ int ret;
cb = e_hal_callback_new(cb_func, data);
msg = e_hal_manager_call_new("FindDeviceByCapability");
dbus_message_append_args(msg, DBUS_TYPE_STRING, &capability,
DBUS_TYPE_INVALID);
- return e_dbus_message_send(conn, msg, cb_manager_find_device_by_capability,
-1, cb) ? 1 : 0;
+ ret = e_dbus_message_send(conn, msg, cb_manager_find_device_by_capability,
-1, cb) ? 1 : 0;
+ dbus_message_unref(msg);
+ return ret;
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs