#else
int port_id = message_port_register_local_port(message_port, message_port_cb, NULL);
#endif
+ int ret = MA_ERROR_NONE;
+
if (port_id < 0) {
- MA_SLOGD("Port register error: %d", port_id); //LCOV_EXCL_LINE
+ MA_SLOGE("Port register error: %d", port_id); //LCOV_EXCL_LINE
+ ret = MA_ERROR_OPERATION_FAILED;
} else {
MA_SLOGD("port_id: %d", port_id); //LCOV_EXCL_LINE
g_local_port_id = port_id;
}
- return 0;
+ return ret;
}
static int streaming_ipc_deinitialize()
int ma_dbus_open_connection()
{
+ if (MA_ERROR_NONE != streaming_ipc_initialize()) {
+ return MA_ERROR_OPERATION_FAILED;
+ }
+
if (NULL != g_conn_sender && NULL != g_conn_listener) {
MA_SLOGW("already existed connection "); //LCOV_EXCL_LINE
return 0;
//LCOV_EXCL_STOP
}
- streaming_ipc_initialize();
-
return 0;
}
int ma_dbus_close_connection()
{
- streaming_ipc_deinitialize();
-
DBusError err;
dbus_error_init(&err);
__ma_dbus_connection_free();
+ streaming_ipc_deinitialize();
+
return 0;
}
MA_SLOGE("@@ multi-assistant send streaming request : Fail to make message"); //LCOV_EXCL_LINE
return MA_ERROR_OPERATION_FAILED;
} else {
- MA_SLOGD("[DEBUG] multi-assistant send streaming request"); //LCOV_EXCL_LINE
+ MA_SLOGE("[DEBUG] multi-assistant send streaming request, %d", g_local_port_id); //LCOV_EXCL_LINE
}
dbus_message_append_args(msg,