3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * Licensed under the Apache License, Version 2.0 (the License);
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
19 #include <sys/socket.h>
26 #include <sync_agent.h>
27 #include <plugin/plugin_slp_sysnoti_wap_push.h>
30 #include "common/dm_common_def.h"
31 #include "common/dm_common.h"
32 #include "common/util/util.h"
33 #include "framework/task/oma_dm_task_request.h"
34 #include "framework/platform-event-handler/dm_platform_event_handler.h"
35 #include "framework/san-parser/pm_sanparser.h"
36 #include "dm-engine/fumo/fumo_account.h"
37 #include "dm-engine/fumo/fumo_engine.h"
38 #include "dm-engine/lawmo/lawmo_account.h"
39 #include "dm-engine/lawmo/lawmo_engine.h"
40 #include "dm-engine/cp/dm_cp_processor.h"
41 #include "dm-engine/cp/dm_cp_security.h"
42 #include "mo-handler/dm_mo_common.h"
44 #ifndef OMADM_AGENT_LOG
46 #define LOG_TAG "OMA_DM_CP_PEH"
49 static DM_ERROR _fumo_interval_alarm(int item_id);
50 static DM_ERROR _fumo_account_registration_alarm(int item_id);
51 static DM_ERROR _lawmo_account_registration_alarm(int item_id);
52 //static DM_ERROR _fota_polling_alarm(int item_id);
53 //static DM_ERROR _lawmo_mobile_tracking_start(int item_id);
54 static DM_ERROR _send_event_ds(char *event_msg);
55 static int _dm_notification_operation(const char *out_message, unsigned int outlen);
57 static int _dm_notification_operation(const char *out_message, unsigned int outlen)
63 retvm_if((out_message) == NULL, COMMON_ERR_IS_NULL, "out_message is NULL!!");
64 _DEBUG_INFO("out_message %d [%s]", outlen, out_message);
66 SanPackage *pSanPackage = NULL;
67 Event_Contents *ev_data = NULL;
69 pSanPackage = sanpackage_noti_parser((char *)out_message, outlen);
70 if (pSanPackage != NULL) {
71 ev_data = (Event_Contents *) calloc(1, sizeof(Event_Contents));
72 if (ev_data == NULL) {
73 _DEBUG_TRACE("calloc failed !!");
74 free_sanpackageparser(pSanPackage);
75 return COMMON_ERR_ALLOC;
77 ev_data->type = IP_PUSH_EVENT;
78 if ((pSanPackage->sessionID) == NULL || (pSanPackage->serverID) == NULL) {
79 _DEBUG_TRACE("san message null");
82 ev_data->session_id = strdup((char *)pSanPackage->sessionID);
83 ev_data->server_id = strdup((char *)pSanPackage->serverID);
84 ev_data->noti_type = pSanPackage->uiMode;
86 _DEBUG_TRACE("event type ip push : %d", ev_data->type);
87 _DEBUG_TRACE("session id : %s", ev_data->session_id);
88 _DEBUG_TRACE("server id : %s", ev_data->server_id);
89 _DEBUG_TRACE("noti type : %d", ev_data->noti_type);
92 SERVICE_SERVER_TYPE engine_type;
93 engine_type = get_service_engine_type(ev_data->server_id);
94 _DEBUG_TRACE("engine type : %d", engine_type);
96 switch (engine_type) {
97 case SAMSUNG_FUMO_TYPE:
100 * check samsung dm acc
102 ret = is_exist_dmacc(SAMSUNG_FUMO_TYPE, &is_exist);
103 if (ret != DM_OK || is_exist == 0) {
104 _DEBUG_TRACE("is exist dmacc error : %d or not exist dm acc : %d", ret, is_exist);
108 ret = fumo_service_start(ev_data);
118 ret = is_exist_dmacc(GCF_TYPE, &is_exist);
119 if (ret != DM_OK || is_exist == 0) {
120 _DEBUG_TRACE("is exist dmacc error : %d or not exist dm acc : %d", ret, is_exist);
124 ret = fumo_service_start(ev_data);
129 case SAMSUNG_FMM_TYPE:
135 ret = is_exist_dmacc(SAMSUNG_FMM_TYPE, &is_exist);
136 if (ret != DM_OK || is_exist == 0) {
137 _DEBUG_TRACE("is exist dmacc error : %d or not exist dm acc : %d", ret, is_exist);
141 ret = dm_lawmo_common_task_request(ev_data);
148 _DEBUG_TRACE("dm non engine ", ret);
153 _DEBUG_TRACE("san message null");
157 free_sanpackageparser(pSanPackage);
162 if(ev_data != NULL) {
163 event_data_free((void *)ev_data);
165 free_sanpackageparser(pSanPackage);
167 _DEBUG_INFO("end error");
171 int dm_wap_push_incomming_callback(int item_id, void *user_data)
175 DM_ERROR ret = DM_OK;
177 retvm_if((user_data) == NULL, -1, "user_data is NULL!!");
179 pmci_san_incoming_s *incomming_struct = (pmci_san_incoming_s *) user_data;
180 if (incomming_struct != NULL) {
183 db_ret = sync_agent_open_agent();
184 _DEBUG_INFO("OPEN DACI : %d", db_ret);
186 /* generate ext_id */
188 char **ext_id_list = NULL;
190 ext_id_list = sync_agent_generate_item_luid(1, 1);
191 if (ext_id_list == NULL) {
195 ext_id = atoi(ext_id_list[0]);
196 _DEBUG_INFO("ext_id : %d", ext_id);
198 /* create folder for generated ext_id */
199 char folder_name[50] = { 0, };
200 snprintf(folder_name, sizeof(folder_name), "%s/%d", CP_DATA_REPOSITORY_PATH, ext_id);
201 _DEBUG_INFO("folder name : %s", folder_name);
203 int folder_ret = sync_agent_create_directory(folder_name);
204 if (folder_ret != 1) {
205 _DEBUG_INFO("sync_agent_create_directory( ext_id : %d ) failed !!", ext_id);
206 _DEBUG_INFO("retry sync_agent_generate_item_luid() !!");
207 // return DM_ERR_UNKNOWN;
208 if (ext_id_list[0] != NULL)
209 free(ext_id_list[0]);
211 if (ext_id_list != NULL)
217 _DEBUG_INFO("sync_agent_create_directory( ext_id : %d ) success !!", ext_id);
218 if (ext_id_list[0] != NULL)
219 free(ext_id_list[0]);
221 if (ext_id_list != NULL)
228 db_ret = sync_agent_close_agent();
229 _DEBUG_INFO("CLOSE DACI : %d", db_ret);
232 switch (incomming_struct->version) {
233 case 13: /*SAN_DM_XML = 13 */
235 /*pSanPackage = sanPackage11Parser( msgBody, msgSize ) ; */
238 case 14: /*SAN_DM_WBXML = 14 */
240 /*pSanPackage = sanPackage12Parser( msgBody, msgSize ) ; */
243 case 15: /*SAN_DM_NOTI = 15 */
245 int result = _dm_notification_operation(incomming_struct->msg_body, incomming_struct->msg_size);
246 _DEBUG_INFO("wap push parser : %d", result);
249 case 16: /*SAN_CP_XML = 16 */
251 // CP_ERROR result = process_Recieved_CP_XML(msgBody, msgSize);
252 CP_ERROR result = process_Recieved_CP_XML(incomming_struct->msg_body, incomming_struct->msg_size, ext_id);
253 _DEBUG_INFO("xml cp parser : %d", result);
256 case 17: /*SAN_CP_WBXML = 17 */
258 // CP_ERROR result = process_Recieved_CP_WBXML(msgBody, msgSize);
259 CP_ERROR result = process_Recieved_CP_WBXML(incomming_struct->msg_body, incomming_struct->msg_size, ext_id);
260 _DEBUG_INFO("wxml cp parser : %d", result);
277 int dm_wap_push_operation_callback(int item_id, void *user_data)
281 DM_ERROR ret = DM_OK;
283 retvm_if((user_data) == NULL, -1, "user_data is NULL!!");
285 CP_ERROR err = CP_ERROR_SUCCESS;
287 pmci_san_operation_s *operation_struct = (pmci_san_operation_s *) user_data;
288 if (operation_struct != NULL) {
290 process_Set_msgId(operation_struct->msg_id);
291 _DEBUG_INFO("msg id : %d", operation_struct->msg_id);
292 _DEBUG_INFO("ext id : %d", operation_struct->ext_id);
294 if (operation_struct->msg_id == -1 && operation_struct->ext_id == -1) { // delete all
295 _DEBUG_INFO("operation : delete all !!");
297 err = process_Delete_All_CP_Data();
298 if (err != CP_ERROR_SUCCESS) {
299 _DEBUG_INFO("process_Delete_All_CP_Data() fail !!");
303 _DEBUG_INFO("process_Delete_All_CP_Data() success !!");
305 } else if (operation_struct->msg_id == -1 && operation_struct->ext_id != -1) { // delete 1 msg
306 _DEBUG_INFO("operation : delete 1 msg !!");
308 err = process_Delete_CP_Data(operation_struct->ext_id);
309 if (err != CP_ERROR_SUCCESS) {
310 _DEBUG_INFO("process_Delete_CP_Data() fail !!");
314 _DEBUG_INFO("process_Delete_CP_Data() success !!");
317 _DEBUG_INFO("operation : install !!");
320 err = process_Check_Pincode(1, NULL, &is_correct, operation_struct->ext_id);
321 if (err != CP_ERROR_SUCCESS) {
322 _DEBUG_INFO("process_Check_Pincode() fail !!");
326 _DEBUG_INFO("process_Check_Pincode() success !!");
328 /* process_Setting_CP() */
329 if (is_correct == 1) {
330 _DEBUG_INFO("NETWPIN case - Valid PIN !!");
332 err = process_Setting_CP(operation_struct->ext_id);
333 if (err != CP_ERROR_SUCCESS) {
334 _DEBUG_INFO("process_Setting_CP() fail !!");
337 _DEBUG_INFO("process_Setting_CP() success !!");
339 } else if (is_correct == 0) {
340 _DEBUG_INFO("NETWPIN case - Invalid PIN !!");
348 if (operation_struct != NULL)
349 free(operation_struct);
358 int dm_ip_push_callback(int item_id, void *user_data)
362 DM_ERROR ret = DM_OK;
364 retvm_if((user_data) == NULL, -1, "user_data is NULL!!");
366 OPER_MODE operationMode;
367 operationMode = OPER_SERVER_INITIATION_FROM_IP;
368 char *pushmessage = NULL;
369 //ip_push_struct->message = strdup("IPP_20111216000000000000000001|DM|Ft4/CLTiWx/Y0AK+fBIayALoAAAAlPcKeDZnMXExNHI3NQ==");
371 pushmessage = strdup((char *)user_data);
372 retvm_if((pushmessage) == NULL, -1, "pushmessage is NULL!!");
374 _DEBUG_INFO("user_data : %s", (char *)user_data);
375 _DEBUG_INFO("push contents : %s", pushmessage);
377 if (pushmessage != NULL) {
378 char *app_type = strchr(pushmessage, '|') + 1;
379 char *message = NULL;
380 message = strstr(app_type, "DS|");
382 if (message != NULL) {
383 _DEBUG_INFO("DS event : %s", message);
384 ret = _send_event_ds(message);
390 message = strchr(app_type, '|') + 1;
391 _DEBUG_INFO("message :%s", message);
393 unsigned int outlen = 0;
394 unsigned char *out_message = g_base64_decode(message, &outlen);
396 int result = _dm_notification_operation((const char *)out_message, outlen);
397 _DEBUG_INFO("ip push parser : %d", result);
400 _DEBUG_INFO("push message null");
405 str_free(&pushmessage);
416 str_free(&pushmessage);
419 _DEBUG_INFO("end error ");
424 int dm_telephony_incomming_callback(int item_id, void *user_data)
428 _DEBUG_INFO("----------------------------------------------------incomming tel----------------------------------------------------");
430 DM_ERROR ret = DM_OK;
432 engine_status *status = NULL;
435 _DEBUG_INFO("dm db open = %d", ret); */
437 is_exist = IsExist_Engine_id(FUMO_SERVICE_ENGINE);
438 _DEBUG_INFO("is engine : %d", is_exist);
441 ret = Get_Engine_Status(FUMO_SERVICE_ENGINE, &status);
445 if (status != NULL) {
446 if (status->ui_mode != NULL) {
447 if (strcmp(status->ui_mode, OMADM_FUMO_BACKGROUND_UI_TYPE) != 0) {
449 if (status->engine_status == DM_SERVICE_ING || status->engine_status == DM_SERVICE_UNKNOWN) {
450 _DEBUG_INFO("cancel fumo task id = %d ", status->task_id);
451 cancel_task(status->task_id);
452 _DEBUG_INFO("terminate ui");
453 terminate_oma_dm_ui(DM_ERR_NOT_FOUND, FUMO_SERVICE_ENGINE);
459 _DEBUG_INFO("back ground ui");
472 if (status != NULL) {
473 Free_Memory_Engine_Status(&status, 1);
485 if (status != NULL) {
486 Free_Memory_Engine_Status(&status, 1);
488 _DEBUG_INFO("ERROR END = %d", ret);
494 int dm_telephony_end_callback(int item_id, void *user_data)
498 _DEBUG_INFO("----------------------------------------------------end tel----------------------------------------------------");
500 DM_ERROR ret = DM_OK;
501 sync_agent_da_return_e err = SYNC_AGENT_DA_SUCCESS;
503 engine_status *status = NULL;
506 char *server_id = NULL;
509 _DEBUG_INFO("dm db open = %d", ret);
511 err = sync_agent_open_agent();
512 _DEBUG_INFO("sync agent db open = %d", ret);
514 is_exist = IsExist_Engine_id(FUMO_SERVICE_ENGINE);
515 _DEBUG_INFO("is engine : %d", is_exist);
523 ret = Get_Engine_Status(FUMO_SERVICE_ENGINE, &status);
527 _DEBUG_INFO("sync agent db close = %d", ret);
530 Free_Memory_Engine_Status(&status, 1);
537 if (status != NULL && status->ui_mode != NULL) {
538 if (!strcmp(status->ui_mode, OMADM_FUMO_BACKGROUND_UI_TYPE)) {
540 is_alarm = check_existed_fumo_reminder_interval();
542 _DEBUG_INFO("have alarm");
546 ret = get_Serverid(SAMSUNG_FUMO_TYPE, &server_id);
550 err = sync_agent_close_agent();
551 _DEBUG_INFO("sync agent db close = %d", ret);
552 Free_Memory_Engine_Status(&status, 1);
557 if (server_id != NULL) {
558 //current time > alarm time
559 Event_Contents *ev_data = (Event_Contents *) calloc(1, sizeof(Event_Contents));
560 ev_data->type = UI_EVENT;
561 ev_data->session_id = NULL;
562 ev_data->server_id = server_id;
563 ev_data->noti_type = NOTI_TYPE_USERINTERACTION;
564 ev_data->ui_mode = strdup(OMADM_FUMO_NOTI_UI_TYPE);
566 ret = dm_fumo_common_task_request(ev_data);
569 err = sync_agent_close_agent();
570 _DEBUG_INFO("sync agent db close = %d", ret);
571 Free_Memory_Engine_Status(&status, 1);
576 _DEBUG_INFO("server id is null");
588 err = sync_agent_close_agent();
589 _DEBUG_INFO("sync agent db close = %d", ret);
590 Free_Memory_Engine_Status(&status, 1);
596 int network_on_callback()
599 _DEBUG_INFO("network on");
604 int network_off_callback()
607 _DEBUG_INFO("network off");
612 int network_change_callback()
617 _DEBUG_INFO("changed network");
628 _DEBUG_INFO("wifi only off mode download");
629 } else if (config == 1) {
630 ret = get_wifi_state();
631 _DEBUG_INFO("wifi only mode : %d", ret);
632 if (ret != SYNC_AGENT_NA_SUCCESS) {
636 ret = auto_operate_service_engine();
638 _DEBUG_INFO("error : %d", ret);
647 int alarm_callback(int item_id, void *user_data)
650 _DEBUG_INFO("#######Scheduler Send Msg Success!!!!!########## : %d", item_id);
652 DM_ERROR ret = DM_OK;
657 sync_agent_da_return_e result = SYNC_AGENT_DA_SUCCESS;
658 sync_agent_da_config_s *config = NULL;
662 db_ret = sync_agent_open_agent();
664 result = sync_agent_is_exist_config(FUMO_INTERVAL_TYPE, FUMO_INTERVAL, &exist);
665 if (result != SYNC_AGENT_DA_SUCCESS) {
670 _DEBUG_INFO("exist : %d", exist);
673 result = sync_agent_get_config_list(FUMO_INTERVAL_TYPE, &list);
674 count = g_list_length(list);
675 _DEBUG_INFO("count : %d", count);
676 if (count != 0 && list != NULL) {
677 config = (sync_agent_da_config_s *) g_list_nth_data(list, 0);
678 if (chartoint(config->value, &value) == 1) {
679 if (value == item_id) {
680 ret = _fumo_interval_alarm(item_id);
682 sync_agent_free_config_list(list);
691 sync_agent_free_config_list(list);
695 result = sync_agent_remove_service_data(1, item_id);
696 _DEBUG_INFO("delete alarm %d", result);
700 result = sync_agent_is_exist_config(FUMO_ACCOUNT_ALARM_TYPE, FUMO_ACCOUNT_ALARM, &exist);
701 if (result != SYNC_AGENT_DA_SUCCESS) {
706 _DEBUG_INFO("exist : %d", exist);
709 result = sync_agent_get_config_list(FUMO_ACCOUNT_ALARM_TYPE, &list);
710 count = g_list_length(list);
711 _DEBUG_INFO("count : %d", count);
712 if (count != 0 && list != NULL) {
713 config = (sync_agent_da_config_s *) g_list_nth_data(list, 0);
714 if (chartoint(config->value, &value) == 1) {
715 if (value == item_id) {
716 ret = _fumo_account_registration_alarm(item_id);
718 sync_agent_free_config_list(list);
727 sync_agent_free_config_list(list);
731 result = sync_agent_is_exist_config(LAWMO_ACCOUNT_ALARM_TYPE, LAWMO_ACCOUNT_ALARM, &exist);
732 if (result != SYNC_AGENT_DA_SUCCESS) {
737 _DEBUG_INFO("exist : %d", exist);
740 result = sync_agent_get_config_list(LAWMO_ACCOUNT_ALARM_TYPE, &list);
741 count = g_list_length(list);
742 _DEBUG_INFO("count : %d", count);
743 if (count != 0 && list != NULL) {
744 config = (sync_agent_da_config_s *) g_list_nth_data(list, 0);
745 if (chartoint(config->value, &value) == 1) {
746 if (value == item_id) {
747 ret = _lawmo_account_registration_alarm(item_id);
749 sync_agent_free_config_list(list);
758 sync_agent_free_config_list(list);
762 db_ret = sync_agent_close_agent();
763 _DEBUG_INFO("CLOSE DACI : %d", db_ret);
769 static DM_ERROR _fumo_interval_alarm(int item_id)
773 DM_ERROR ret = DM_OK;
774 char *server_id = NULL;
775 engine_status *status = NULL;
776 Event_Contents *ev_data = NULL;
780 _DEBUG_TRACE("status db : %d", ret);
783 * check samsung dm acc
785 ret = is_exist_dmacc(SAMSUNG_FUMO_TYPE, &is_exist);
786 if (ret != DM_OK || is_exist == 0) {
787 _DEBUG_TRACE("is exist dmacc error : %d or not exist dm acc : %d", ret, is_exist);
791 if (IsExist_Engine_id(FUMO_SERVICE_ENGINE) != 0) {
792 ret = Get_Engine_Status(FUMO_SERVICE_ENGINE, &status);
796 _DEBUG_TRACE(" result =[%d]\n", ret);
797 /*update engine_status */
798 if (status != NULL) {
799 if (status->server_id != NULL) {
800 server_id = strdup(status->server_id);
803 status->engine_status = DM_SERVICE_ING;
804 if (status->download_click == RESUME_STATUS_INSTALL_IDLE) {
805 status->download_click = RESUME_STATUS_INSTALL;
806 } else if (status->download_click == RESUME_STATUS_DOWNLOAD_IDLE) {
807 status->download_click = RESUME_STATUS_DOWNLOAD;
809 status->download_click = RESUME_STATUS_DOWNLOAD;
812 ret = Update_Engine_Status(status);
813 _DEBUG_TRACE(" update engine status : %d \n", ret);
817 Free_Memory_Engine_Status(&status, 1);
823 /*************************************************/
825 if (server_id == NULL) {
826 ret = get_Serverid(SAMSUNG_FUMO_TYPE, &server_id);
827 if (ret != DM_OK || server_id == NULL)
831 ev_data = (Event_Contents *) calloc(1, sizeof(Event_Contents));
832 if (ev_data == NULL) {
833 _DEBUG_TRACE("calloc failed !!");
834 ret = COMMON_ERR_ALLOC;
837 ev_data->type = UI_EVENT;
838 ev_data->session_id = NULL;
839 ev_data->server_id = strdup(server_id);
840 ev_data->noti_type = NOTI_TYPE_USERINTERACTION;
841 ev_data->ui_mode = strdup(OMADM_FUMO_NOTI_UI_TYPE);
843 _DEBUG_TRACE("alarm : %s", ev_data->server_id);
844 ret = dm_fumo_common_task_request(ev_data);
849 str_free(&server_id);
855 str_free(&server_id);
856 event_data_free((void *)ev_data);
860 Free_Memory_Engine_Status(&status, 1);
862 _DEBUG_TRACE("end error : %d", ret);
867 static DM_ERROR _fumo_account_registration_alarm(int item_id)
871 DM_ERROR ret = DM_OK;
873 ret = register_fota_account();
875 _DEBUG_TRACE("fail register fota account : %d ", ret);
876 ret = DM_ERR_FOTA_ACCOUNT_REGISTRATION;
878 _DEBUG_TRACE("success register fota account : %d ", ret);
885 static DM_ERROR _lawmo_account_registration_alarm(int item_id)
889 DM_ERROR ret = DM_OK;
891 ret = register_lawmo_account(item_id, NULL);
893 _DEBUG_TRACE("fail register lawmo account : %d ", ret);
894 ret = DM_ERR_LAWMO_ACCOUNT_REGISTRATION;
896 _DEBUG_TRACE("success register lawmo account : %d ", ret);
903 static DM_ERROR _fota_polling_alarm(int item_id)
907 DM_ERROR ret = DM_OK;
911 static DM_ERROR _lawmo_mobile_tracking_start(int item_id)
915 DM_ERROR ret = DM_OK;
920 static DM_ERROR _send_event_ds(char *event_msg)
926 struct sockaddr_un clientaddr;
930 retvm_if((event_msg) == NULL, DM_ERR_EVENT_DS, "event_msg is NULL!!");
932 msg = strchr(event_msg, '|') + 1;
933 _DEBUG_TRACE("msg = %s", msg);
935 sync_agent_event_data_s *event = sync_agent_create_event(event_type);
937 _DEBUG_TRACE("event is NULL");
939 return DM_ERR_EVENT_DS;
942 sync_agent_append_event_data_param(event, SYNC_AGENT_EVENT_PARAM_TYPE_STRING, msg);
944 client_sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
945 if (client_sockfd == -1) {
946 _DEBUG_TRACE("socket create Error!!");
947 sync_agent_free_event(event);
949 return DM_ERR_EVENT_DS;
952 bzero(&clientaddr, sizeof(clientaddr));
953 clientaddr.sun_family = AF_UNIX;
957 str_len = g_strlcpy(clientaddr.sun_path, IPC_DS, (int)sizeof(clientaddr.sun_path));
958 if (str_len >= sizeof(clientaddr.sun_path)) {
959 _DEBUG_TRACE("buffer overflow");
960 sync_agent_free_event(event);
961 close(client_sockfd);
963 return CP_ERROR_FAIL;
966 client_len = sizeof(clientaddr);
968 if (connect(client_sockfd, (struct sockaddr *)&clientaddr, client_len) < 0) {
969 _DEBUG_TRACE("socket connect error");
970 sync_agent_free_event(event);
971 close(client_sockfd);
973 return DM_ERR_EVENT_DS;
976 int send_data_size = (event->data - event->size) + 1;
977 int write_ret = write(client_sockfd, (void *)(event->size), send_data_size);
978 _DEBUG_TRACE("write ret : %d", write_ret);
979 close(client_sockfd);
980 sync_agent_free_event(event);
986 void event_data_free(void *event_data)
990 retm_if((event_data) == NULL, "event_data is NULL!!");
992 Event_Contents *pEvent_data = (Event_Contents *) event_data;
994 pEvent_data->type = 0;
995 pEvent_data->noti_type = 0;
996 str_free(&(pEvent_data->server_id));
997 str_free(&(pEvent_data->session_id));
998 str_free(&(pEvent_data->ui_mode));