summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiyong Min <jiyong.min@samsung.com>2017-09-25 09:20:35 +0900
committerJiyong Min <jiyong.min@samsung.com>2017-09-25 09:23:24 +0900
commitcdb45356679ca4e6e19bad5f9f7b37339c2044f9 (patch)
tree3aa9b82189bca22909998bf876cfb2b0b3e4e586
parente419decd5ac7751197906a9eee2cfc9596f48a9a (diff)
downloadmedia-controller-cdb45356679ca4e6e19bad5f9f7b37339c2044f9.tar.gz
media-controller-cdb45356679ca4e6e19bad5f9f7b37339c2044f9.tar.bz2
media-controller-cdb45356679ca4e6e19bad5f9f7b37339c2044f9.zip
Modify dbus user_data from GList * to GList **submit/tizen/20170922.060558accepted/tizen/unified/20170925.071136
The pointer address of the list can be changeable during getting callback. So GList ** will be used. Change-Id: Ib1a8dd7d3264ac3054ccafb7b036fa38da6cd9cf Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
-rwxr-xr-xsrc/media_controller_ipc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/media_controller_ipc.c b/src/media_controller_ipc.c
index 09ed146..5bde8e9 100755
--- a/src/media_controller_ipc.c
+++ b/src/media_controller_ipc.c
@@ -46,7 +46,7 @@ static void __mc_ipc_signal_cb(GDBusConnection *connection,
GVariant *parameters,
gpointer user_data)
{
- GList *listener_list = (GList *)user_data;
+ GList **listener_list = (GList **)user_data;
mc_ipc_listener_s *listener = NULL;
unsigned int i = 0;
@@ -66,9 +66,9 @@ static void __mc_ipc_signal_cb(GDBusConnection *connection,
return;
}
- unsigned int listener_cnt = g_list_length(listener_list);
+ unsigned int listener_cnt = g_list_length(*listener_list);
for (i = 0; i < listener_cnt; i++) {
- listener = (mc_ipc_listener_s *)g_list_nth_data(listener_list, i);
+ listener = (mc_ipc_listener_s *)g_list_nth_data(*listener_list, i);
if (listener && !g_strcmp0(listener->key, key)) {
mc_debug("Received : [%s] (flags = %x) from %s.%s", message, internal_flags, listener->interface_name, listener->signal_name);
listener->callback(listener->interface_name, listener->signal_name, message, 0, listener->user_data);
@@ -196,7 +196,7 @@ int mc_ipc_register_listener(GList **listener_list, GDBusConnection *connection,
return MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY;
}
- handler = _mc_ipc_signal_subscribe(connection, interface_name, signal_name, *listener_list);
+ handler = _mc_ipc_signal_subscribe(connection, interface_name, signal_name, listener_list);
listener->dbus_conn = connection;
listener->interface_name = strdup(interface_name);