#define MS_TIMEOUT_SEC_3 3 /**< Response from Server time out */
#define MS_TIMEOUT_SEC_10 10 /**< Response from Server time out */
#define MS_TIMEOUT_SEC_20 20 /**< Response from Media server time out */
+#define MS_TIMEOUT_SEC_60 60 /**< Response from DCM Service time out */
typedef enum{
MS_DB_BATCH_UPDATE_PORT = 0, /**< Media DB batch update */
int msg_type;
int pid;
uid_t uid;
+ int result;
size_t msg_size;
char msg[MAX_FILEPATH_LEN];
- int result;
} dcmMsg;
#endif /*_MEDIA_SERVER_IPC_H_*/
extern "C" {
#endif
+enum {
+ DCM_REQUEST_MEDIA,
+ DCM_REQUEST_ALL_MEDIA,
+ DCM_REQUEST_START_FACE_DETECTION,
+ DCM_REQUEST_CANCEL_FACE,
+};
+
typedef int (*FaceFunc) (int error_code, int count, void* data);
int dcm_request_extract_all(uid_t uid);
faceUserData *userData;
} dcmReq;
-enum {
- DCM_REQUEST_MEDIA,
- DCM_REQUEST_ALL_MEDIA,
- DCM_REQUEST_START_FACE_DETECTION,
- DCM_REQUEST_CANCEL_FACE,
-};
-
typedef enum
{
DCM_PHONE, /**< Stored only in phone */
MSAPI_DBG("_media_dcm_send_request start");
- err = ms_ipc_create_client_socket(MS_PROTOCOL_TCP, MS_TIMEOUT_SEC_10, &sock_info);
+ err = ms_ipc_create_client_socket(MS_PROTOCOL_TCP, MS_TIMEOUT_SEC_60, &sock_info);
if (err != MS_MEDIA_ERR_NONE) {
MSAPI_DBG_ERR("ms_ipc_create_client_socket failed");
return err;
int pid;
sock_info.port = MS_DCM_CREATOR_PORT;
- err = ms_ipc_create_client_socket(MS_PROTOCOL_TCP, MS_TIMEOUT_SEC_10, &sock_info);
+ err = ms_ipc_create_client_socket(MS_PROTOCOL_TCP, MS_TIMEOUT_SEC_60, &sock_info);
if (err != MS_MEDIA_ERR_NONE) {
MSAPI_DBG_ERR("ms_ipc_create_client_socket failed");
return err;
Name: media-server
Summary: A server for media content management
-Version: 0.3.31
+Version: 0.3.32
Release: 0
Group: Multimedia/Service
License: Apache-2.0
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());
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;
}
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);