From 10ea5485afb906051d08b383d80bf12fc11f7d22 Mon Sep 17 00:00:00 2001 From: Gukhwan Cho Date: Tue, 30 Jun 2015 16:12:47 +0900 Subject: [PATCH] add on-demand timer to omitted APIs Change-Id: I4733311984f20eac83ce7a84e344915352bcc50f Signed-off-by: Gukhwan Cho --- server/ctsvc_ipc_server.c | 3 +++ server/ctsvc_ipc_server2.c | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/server/ctsvc_ipc_server.c b/server/ctsvc_ipc_server.c index 98c8b43..3cdfcaa 100644 --- a/server/ctsvc_ipc_server.c +++ b/server/ctsvc_ipc_server.c @@ -148,6 +148,7 @@ ERROR_RETURN: *outdata = pims_ipc_data_create(0); if (NULL == *outdata) { CTS_ERR("pims_ipc_data_create() Fail"); + ctsvc_server_timeout(); return; } @@ -155,6 +156,7 @@ ERROR_RETURN: pims_ipc_data_destroy(*outdata); *outdata = NULL; CTS_ERR("ctsvc_ipc_marshal_int() Fail"); + ctsvc_server_timeout(); return; } @@ -163,6 +165,7 @@ ERROR_RETURN: pims_ipc_data_destroy(*outdata); *outdata = NULL; CTS_ERR("ctsvc_ipc_marshal_bool() Fail"); + ctsvc_server_timeout(); return; } } diff --git a/server/ctsvc_ipc_server2.c b/server/ctsvc_ipc_server2.c index 63060e5..a424bac 100644 --- a/server/ctsvc_ipc_server2.c +++ b/server/ctsvc_ipc_server2.c @@ -40,6 +40,7 @@ #include "ctsvc_ipc_server.h" #include "ctsvc_db_utils.h" #include "ctsvc_handle.h" +#include "ctsvc_server_utils.h" void ctsvc_ipc_activity_delete_by_contact_id(pims_ipc_h ipc, pims_ipc_data_h indata, pims_ipc_data_h *outdata, void *userdata) { @@ -102,6 +103,7 @@ ERROR_RETURN: } DATA_FREE: ctsvc_handle_destroy(contact); + ctsvc_server_timeout(); return; } @@ -164,6 +166,7 @@ ERROR_RETURN: } DATA_FREE: ctsvc_handle_destroy(contact); + ctsvc_server_timeout(); return; } @@ -233,6 +236,7 @@ ERROR_RETURN: } DATA_FREE: ctsvc_handle_destroy(contact); + ctsvc_server_timeout(); return; } @@ -303,6 +307,7 @@ ERROR_RETURN: } DATA_FREE: ctsvc_handle_destroy(contact); + ctsvc_server_timeout(); return; } @@ -377,6 +382,7 @@ ERROR_RETURN: } DATA_FREE: ctsvc_handle_destroy(contact); + ctsvc_server_timeout(); return; } @@ -445,6 +451,7 @@ ERROR_RETURN: } DATA_FREE: ctsvc_handle_destroy(contact); + ctsvc_server_timeout(); return; } void ctsvc_ipc_person_unlink_contact(pims_ipc_h ipc, pims_ipc_data_h indata, pims_ipc_data_h *outdata, void *userdata) @@ -520,6 +527,7 @@ ERROR_RETURN: } DATA_FREE: ctsvc_handle_destroy(contact); + ctsvc_server_timeout(); return; } void ctsvc_ipc_person_reset_usage(pims_ipc_h ipc, pims_ipc_data_h indata, pims_ipc_data_h *outdata, void *userdata) @@ -589,6 +597,7 @@ ERROR_RETURN: } DATA_FREE: ctsvc_handle_destroy(contact); + ctsvc_server_timeout(); return; } void ctsvc_ipc_person_set_favorite_order(pims_ipc_h ipc, pims_ipc_data_h indata, pims_ipc_data_h *outdata, void *userdata) @@ -662,6 +671,7 @@ ERROR_RETURN: } DATA_FREE: ctsvc_handle_destroy(contact); + ctsvc_server_timeout(); return; } @@ -731,6 +741,7 @@ ERROR_RETURN: } DATA_FREE: ctsvc_handle_destroy(contact); + ctsvc_server_timeout(); return; } @@ -797,6 +808,7 @@ ERROR_RETURN: } DATA_FREE: ctsvc_handle_destroy(contact); + ctsvc_server_timeout(); return; } @@ -849,6 +861,7 @@ ERROR_RETURN: } DATA_FREE: ctsvc_handle_destroy(contact); + ctsvc_server_timeout(); return; } @@ -930,6 +943,7 @@ DATA_FREE: ctsvc_handle_destroy(contact); free(number); + ctsvc_server_timeout(); return; } #endif /* ENABLE_LOG_FEATURE */ @@ -952,18 +966,21 @@ ERROR_RETURN: *outdata = pims_ipc_data_create(0); if (NULL == *outdata) { CTS_ERR("pims_ipc_data_create() Fail"); + ctsvc_server_timeout(); return; } if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(ret, *outdata)) { pims_ipc_data_destroy(*outdata); *outdata = NULL; CTS_ERR("ctsvc_ipc_marshal_int() Fail (return value)"); + ctsvc_server_timeout(); return; } if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(order, *outdata)) { pims_ipc_data_destroy(*outdata); *outdata = NULL; CTS_ERR("ctsvc_ipc_marshal_int() Fail (id)"); + ctsvc_server_timeout(); return; } } @@ -971,6 +988,7 @@ ERROR_RETURN: CTS_ERR("outdata is NULL"); } + ctsvc_server_timeout(); return; } @@ -992,12 +1010,14 @@ ERROR_RETURN: *outdata = pims_ipc_data_create(0); if (NULL == *outdata) { CTS_ERR("pims_ipc_data_create() Fail"); + ctsvc_server_timeout(); return; } if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(ret, *outdata)) { pims_ipc_data_destroy(*outdata); *outdata = NULL; CTS_ERR("ctsvc_ipc_marshal_int() Fail (return value)"); + ctsvc_server_timeout(); return; } if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(order, *outdata)) { @@ -1011,6 +1031,7 @@ ERROR_RETURN: CTS_ERR("outdata is NULL"); } + ctsvc_server_timeout(); return; } @@ -1044,12 +1065,14 @@ ERROR_RETURN: *outdata = pims_ipc_data_create(0); if (NULL == *outdata) { CTS_ERR("pims_ipc_data_create() Fail"); + ctsvc_server_timeout(); return; } if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(ret, *outdata)) { pims_ipc_data_destroy(*outdata); *outdata = NULL; CTS_ERR("ctsvc_ipc_marshal_int() Fail"); + ctsvc_server_timeout(); return; } } @@ -1057,6 +1080,7 @@ ERROR_RETURN: CTS_ERR("outdata is NULL"); } + ctsvc_server_timeout(); return; } @@ -1090,12 +1114,14 @@ ERROR_RETURN: *outdata = pims_ipc_data_create(0); if (NULL == *outdata) { CTS_ERR("pims_ipc_data_create() Fail"); + ctsvc_server_timeout(); return; } if (CONTACTS_ERROR_NONE != ctsvc_ipc_marshal_int(ret, *outdata)) { pims_ipc_data_destroy(*outdata); *outdata = NULL; CTS_ERR("ctsvc_ipc_marshal_int() Fail"); + ctsvc_server_timeout(); return; } } @@ -1103,6 +1129,7 @@ ERROR_RETURN: CTS_ERR("outdata is NULL"); } + ctsvc_server_timeout(); return; } -- 2.7.4