Add missing trusted message port migration code 85/258485/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Tue, 18 May 2021 10:18:59 +0000 (19:18 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Tue, 18 May 2021 10:19:02 +0000 (19:19 +0900)
Change-Id: I75a29226bc5fc59013f80453f8bc0b959a76a04e

client/ma_dbus.c

index 4aced1c3b734ca154ed66800d949672a2b7aba7f..3a83fc7f4c0faccf10203d74c5d42ab521b7d85f 100644 (file)
@@ -137,7 +137,11 @@ static void message_port_cb(int local_port_id,
 
 static int streaming_ipc_initialize()
 {
+#if USE_TRUSTED_MESSAGE_PORT
+       int port_id = message_port_register_trusted_local_port(message_port, message_port_cb, NULL);
+#else
        int port_id = message_port_register_local_port(message_port, message_port_cb, NULL);
+#endif
        if (port_id < 0) {
                MA_SLOGD("Port register error: %d", port_id); //LCOV_EXCL_LINE
        } else {
@@ -150,7 +154,11 @@ static int streaming_ipc_initialize()
 
 static int streaming_ipc_deinitialize()
 {
+#if USE_TRUSTED_MESSAGE_PORT
+       if (-1 != g_local_port_id) message_port_unregister_trusted_local_port(g_local_port_id);
+#else
        if (-1 != g_local_port_id) message_port_unregister_local_port(g_local_port_id);
+#endif
        g_local_port_id = -1;
        return 0;
 }