Modify DCM message structure and so on
[platform/core/multimedia/media-server.git] / src / server / media-server-dcm.c
old mode 100644 (file)
new mode 100755 (executable)
index f50e504..a81b8a6
@@ -98,7 +98,7 @@ void _ms_dcm_create_timer(int id)
        if (id > 0)
                g_source_destroy(g_main_context_find_source_by_id(g_main_context_get_thread_default(), id));
 
-       GSource *timer_src = g_timeout_source_new_seconds(MS_TIMEOUT_SEC_20);
+       GSource *timer_src = g_timeout_source_new_seconds(MS_TIMEOUT_SEC_60);
        g_source_set_callback(timer_src, _ms_dcm_agent_timer, NULL, NULL);
        g_dcm_timer_id = g_source_attach(timer_src, g_main_context_get_thread_default());
 
@@ -283,7 +283,7 @@ gboolean _ms_dcm_agent_send_msg_to_dcm_server(dcmMsg *recv_msg, dcmMsg *res_msg)
                return FALSE;
        }
 
-       if (ms_ipc_create_client_socket(MS_PROTOCOL_TCP, MS_TIMEOUT_SEC_10, &sock_info) < 0) {
+       if (ms_ipc_create_client_socket(MS_PROTOCOL_TCP, MS_TIMEOUT_SEC_60, &sock_info) < 0) {
                MS_DBG_ERR("ms_ipc_create_client_socket failed");
                return FALSE;
        }
@@ -318,7 +318,7 @@ gboolean _ms_dcm_agent_send_msg_to_dcm_server(dcmMsg *recv_msg, dcmMsg *res_msg)
        MS_DBG_SLOG("recv %s(%d, %d) from DCM daemon is successful", res_msg->msg, res_msg->msg_type, res_msg->result);
        ms_ipc_delete_client_socket(&sock_info);
 
-       if (res_msg->msg_type == 1 && g_dcm_comm_sock > 0) { /* DCM_REQUEST_ALL_MEDIA */
+       if (res_msg->msg_type == DCM_REQUEST_MEDIA && g_dcm_comm_sock > 0) { /* DCM_REQUEST_ALL_MEDIA */
                GSource *source = NULL;
                if (g_dcm_tcp_channel == NULL)
                        g_dcm_tcp_channel = g_io_channel_unix_new(g_dcm_comm_sock);