From: Enlightenment C. <no...@cv...> - 2007-03-22 19:53:18
|
Enlightenment CVS committal Author : rephorm Project : e17 Module : proto Dir : e17/proto/e_dbus/src/lib/nm Modified Files: e_nm_device.c e_nm_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/nm/e_nm_device.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- e_nm_device.c 21 Mar 2007 10:31:16 -0000 1.1 +++ e_nm_device.c 22 Mar 2007 19:52:59 -0000 1.2 @@ -12,10 +12,13 @@ { E_NM_Callback *cb; DBusMessage *msg; + int ret; cb = e_nm_callback_new(cb_func, data); msg = e_nm_device_call_new(device, "Deactivate"); - return e_dbus_message_send(ctx->conn, msg, cb_nm_generic, -1, cb) ? 1 : 0; + ret = e_dbus_message_send(ctx->conn, msg, cb_nm_generic, -1, cb) ? 1 : 0; + dbus_message_unref(msg); + return ret; } int @@ -23,6 +26,7 @@ { E_NM_Callback *cb; DBusMessage *msg; + int ret; dbus_bool_t val; val = user_requested; @@ -30,7 +34,9 @@ cb = e_nm_callback_new(cb_func, data); msg = e_nm_device_wired_call_new(device, "Activate"); dbus_message_append_args(msg, DBUS_TYPE_BOOLEAN, &val, DBUS_TYPE_INVALID); - return e_dbus_message_send(ctx->conn, msg, cb_nm_generic, -1, cb) ? 1 : 0; + ret = e_dbus_message_send(ctx->conn, msg, cb_nm_generic, -1, cb) ? 1 : 0; + dbus_message_unref(msg); + return ret; } int @@ -38,10 +44,13 @@ { E_NM_Callback *cb; DBusMessage *msg; + int ret; cb = e_nm_callback_new(cb_func, data); msg = e_nm_device_wireless_call_new(device, "GetActiveNetworks"); - return e_dbus_message_send(ctx->conn, msg, cb_nm_string_list, -1, cb) ? 1 : 0; + ret = e_dbus_message_send(ctx->conn, msg, cb_nm_string_list, -1, cb) ? 1 : 0; + dbus_message_unref(msg); + return ret; } int @@ -49,6 +58,7 @@ { E_NM_Callback *cb; DBusMessage *msg; + int ret; dbus_bool_t val; val = user_requested; @@ -56,5 +66,7 @@ cb = e_nm_callback_new(cb_func, data); msg = e_nm_device_wireless_call_new(device, "Activate"); dbus_message_append_args(msg, DBUS_TYPE_STRING, &access_point, DBUS_TYPE_BOOLEAN, &val, DBUS_TYPE_INVALID); - return e_dbus_message_send(ctx->conn, msg, cb_nm_generic, -1, cb) ? 1 : 0; + ret = e_dbus_message_send(ctx->conn, msg, cb_nm_generic, -1, cb) ? 1 : 0; + dbus_message_unref(msg); + return ret; } =================================================================== RCS file: /cvs/e/e17/proto/e_dbus/src/lib/nm/e_nm_manager.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- e_nm_manager.c 21 Mar 2007 10:31:16 -0000 1.1 +++ e_nm_manager.c 22 Mar 2007 19:52:59 -0000 1.2 @@ -17,11 +17,14 @@ { E_NM_Callback *cb; DBusMessage *msg; + int ret; cb = e_nm_callback_new(cb_func, data); msg = e_nm_manager_call_new("GetDevices"); - return e_dbus_message_send(ctx->conn, msg, cb_nm_string_list, -1, cb) ? 1 : 0; + ret = e_dbus_message_send(ctx->conn, msg, cb_nm_string_list, -1, cb) ? 1 : 0; + dbus_message_unref(msg); + return ret; } /** @@ -38,11 +41,14 @@ { E_NM_Callback *cb; DBusMessage *msg; + int ret; dbus_bool_t var = do_sleep; cb = e_nm_callback_new(cb_func, data); msg = e_nm_manager_call_new("Sleep"); dbus_message_append_args(msg, DBUS_TYPE_BOOLEAN, &var, DBUS_TYPE_INVALID); - return e_dbus_message_send(ctx->conn, msg, cb_nm_generic, -1, cb) ? 1 : 0; + ret = e_dbus_message_send(ctx->conn, msg, cb_nm_generic, -1, cb) ? 1 : 0; + dbus_message_unref(msg); + return ret; } |