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 _send_event_ds(char *event_msg);
53 static int _dm_notification_operation(const char *out_message, unsigned int outlen);
55 static int _dm_notification_operation(const char *out_message, unsigned int outlen)
61 retvm_if((out_message) == NULL, COMMON_ERR_IS_NULL, "out_message is NULL!!");
62 _DEBUG_INFO("out_message %d [%s]", outlen, out_message);
64 SanPackage *pSanPackage = NULL;
65 Event_Contents *ev_data = NULL;
67 pSanPackage = sanpackage_noti_parser((char *)out_message, outlen);
68 if (pSanPackage != NULL) {
69 ev_data = (Event_Contents *) calloc(1, sizeof(Event_Contents));
70 if (ev_data == NULL) {
71 _DEBUG_TRACE("calloc failed !!");
72 free_sanpackageparser(pSanPackage);
73 return COMMON_ERR_ALLOC;
75 ev_data->type = IP_PUSH_EVENT;
76 if ((pSanPackage->sessionID) == NULL || (pSanPackage->serverID) == NULL) {
77 _DEBUG_TRACE("san message null");
80 ev_data->session_id = strdup((char *)pSanPackage->sessionID);
81 ev_data->server_id = strdup((char *)pSanPackage->serverID);
82 ev_data->noti_type = pSanPackage->uiMode;
84 _DEBUG_TRACE("event type ip push : %d", ev_data->type);
85 _DEBUG_TRACE("session id : %s", ev_data->session_id);
86 _DEBUG_TRACE("server id : %s", ev_data->server_id);
87 _DEBUG_TRACE("noti type : %d", ev_data->noti_type);
90 SERVICE_SERVER_TYPE engine_type;
91 engine_type = get_service_engine_type(ev_data->server_id);
92 _DEBUG_TRACE("engine type : %d", engine_type);
94 switch (engine_type) {
95 case SAMSUNG_FUMO_TYPE:
98 * check samsung dm acc
100 ret = is_exist_dmacc(SAMSUNG_FUMO_TYPE, &is_exist);
101 if (ret != DM_OK || is_exist == 0) {
102 _DEBUG_TRACE("is exist dmacc error : %d or not exist dm acc : %d", ret, is_exist);
106 ret = fumo_service_start(ev_data);
116 ret = is_exist_dmacc(GCF_TYPE, &is_exist);
117 if (ret != DM_OK || is_exist == 0) {
118 _DEBUG_TRACE("is exist dmacc error : %d or not exist dm acc : %d", ret, is_exist);
122 ret = fumo_service_start(ev_data);
127 case SAMSUNG_FMM_TYPE:
133 ret = is_exist_dmacc(SAMSUNG_FMM_TYPE, &is_exist);
134 if (ret != DM_OK || is_exist == 0) {
135 _DEBUG_TRACE("is exist dmacc error : %d or not exist dm acc : %d", ret, is_exist);
139 ret = dm_lawmo_common_task_request(ev_data);
146 _DEBUG_TRACE("dm non engine ", ret);
151 _DEBUG_TRACE("san message null");
155 free_sanpackageparser(pSanPackage);
160 if(ev_data != NULL) {
161 event_data_free((void *)ev_data);
163 free_sanpackageparser(pSanPackage);
165 _DEBUG_INFO("end error");
169 int dm_wap_push_incomming_callback(int item_id, void *user_data)
173 DM_ERROR ret = DM_OK;
175 retvm_if((user_data) == NULL, -1, "user_data is NULL!!");
177 pmci_san_incoming_s *incomming_struct = (pmci_san_incoming_s *) user_data;
178 if (incomming_struct != NULL) {
181 db_ret = sync_agent_open_agent();
182 _DEBUG_INFO("OPEN DACI : %d", db_ret);
184 /* generate ext_id */
186 char **ext_id_list = NULL;
188 ext_id_list = sync_agent_generate_item_luid(1, 1);
189 if (ext_id_list == NULL) {
193 ext_id = atoi(ext_id_list[0]);
194 _DEBUG_INFO("ext_id : %d", ext_id);
196 /* create folder for generated ext_id */
197 char folder_name[50] = { 0, };
198 snprintf(folder_name, sizeof(folder_name), "%s/%d", CP_DATA_REPOSITORY_PATH, ext_id);
199 _DEBUG_INFO("folder name : %s", folder_name);
201 int folder_ret = sync_agent_create_directory(folder_name);
202 if (folder_ret != 1) {
203 _DEBUG_INFO("sync_agent_create_directory( ext_id : %d ) failed !!", ext_id);
204 _DEBUG_INFO("retry sync_agent_generate_item_luid() !!");
205 // return DM_ERR_UNKNOWN;
206 if (ext_id_list[0] != NULL)
207 free(ext_id_list[0]);
209 if (ext_id_list != NULL)
215 _DEBUG_INFO("sync_agent_create_directory( ext_id : %d ) success !!", ext_id);
216 if (ext_id_list[0] != NULL)
217 free(ext_id_list[0]);
219 if (ext_id_list != NULL)
226 db_ret = sync_agent_close_agent();
227 _DEBUG_INFO("CLOSE DACI : %d", db_ret);
230 switch (incomming_struct->version) {
231 case 13: /*SAN_DM_XML = 13 */
233 /*pSanPackage = sanPackage11Parser( msgBody, msgSize ) ; */
236 case 14: /*SAN_DM_WBXML = 14 */
238 /*pSanPackage = sanPackage12Parser( msgBody, msgSize ) ; */
241 case 15: /*SAN_DM_NOTI = 15 */
243 int result = _dm_notification_operation(incomming_struct->msg_body, incomming_struct->msg_size);
244 _DEBUG_INFO("wap push parser : %d", result);
247 case 16: /*SAN_CP_XML = 16 */
249 // CP_ERROR result = process_Recieved_CP_XML(msgBody, msgSize);
250 CP_ERROR result = process_Recieved_CP_XML(incomming_struct->msg_body, incomming_struct->msg_size, ext_id);
251 _DEBUG_INFO("xml cp parser : %d", result);
254 case 17: /*SAN_CP_WBXML = 17 */
256 // CP_ERROR result = process_Recieved_CP_WBXML(msgBody, msgSize);
257 CP_ERROR result = process_Recieved_CP_WBXML(incomming_struct->msg_body, incomming_struct->msg_size, ext_id);
258 _DEBUG_INFO("wxml cp parser : %d", result);
275 int dm_wap_push_operation_callback(int item_id, void *user_data)
279 DM_ERROR ret = DM_OK;
281 retvm_if((user_data) == NULL, -1, "user_data is NULL!!");
283 CP_ERROR err = CP_ERROR_SUCCESS;
285 pmci_san_operation_s *operation_struct = (pmci_san_operation_s *) user_data;
286 if (operation_struct != NULL) {
288 process_Set_msgId(operation_struct->msg_id);
289 _DEBUG_INFO("msg id : %d", operation_struct->msg_id);
290 _DEBUG_INFO("ext id : %d", operation_struct->ext_id);
292 if (operation_struct->msg_id == -1 && operation_struct->ext_id == -1) { // delete all
293 _DEBUG_INFO("operation : delete all !!");
295 err = process_Delete_All_CP_Data();
296 if (err != CP_ERROR_SUCCESS) {
297 _DEBUG_INFO("process_Delete_All_CP_Data() fail !!");
301 _DEBUG_INFO("process_Delete_All_CP_Data() success !!");
303 } else if (operation_struct->msg_id == -1 && operation_struct->ext_id != -1) { // delete 1 msg
304 _DEBUG_INFO("operation : delete 1 msg !!");
306 err = process_Delete_CP_Data(operation_struct->ext_id);
307 if (err != CP_ERROR_SUCCESS) {
308 _DEBUG_INFO("process_Delete_CP_Data() fail !!");
312 _DEBUG_INFO("process_Delete_CP_Data() success !!");
315 _DEBUG_INFO("operation : install !!");
318 err = process_Check_Pincode(1, NULL, &is_correct, operation_struct->ext_id);
319 if (err != CP_ERROR_SUCCESS) {
320 _DEBUG_INFO("process_Check_Pincode() fail !!");
324 _DEBUG_INFO("process_Check_Pincode() success !!");
326 /* process_Setting_CP() */
327 if (is_correct == 1) {
328 _DEBUG_INFO("NETWPIN case - Valid PIN !!");
330 err = process_Setting_CP(operation_struct->ext_id);
331 if (err != CP_ERROR_SUCCESS) {
332 _DEBUG_INFO("process_Setting_CP() fail !!");
335 _DEBUG_INFO("process_Setting_CP() success !!");
337 } else if (is_correct == 0) {
338 _DEBUG_INFO("NETWPIN case - Invalid PIN !!");
346 if (operation_struct != NULL)
347 free(operation_struct);
356 int dm_ip_push_callback(int item_id, void *user_data)
360 DM_ERROR ret = DM_OK;
362 retvm_if((user_data) == NULL, -1, "user_data is NULL!!");
364 OPER_MODE operationMode;
365 operationMode = OPER_SERVER_INITIATION_FROM_IP;
366 char *pushmessage = NULL;
367 //ip_push_struct->message = strdup("IPP_20111216000000000000000001|DM|Ft4/CLTiWx/Y0AK+fBIayALoAAAAlPcKeDZnMXExNHI3NQ==");
369 pushmessage = strdup((char *)user_data);
370 retvm_if((pushmessage) == NULL, -1, "pushmessage is NULL!!");
372 _DEBUG_INFO("user_data : %s", (char *)user_data);
373 _DEBUG_INFO("push contents : %s", pushmessage);
375 if (pushmessage != NULL) {
376 char *app_type = strchr(pushmessage, '|') + 1;
377 char *message = NULL;
378 message = strstr(app_type, "DS|");
380 if (message != NULL) {
381 _DEBUG_INFO("DS event : %s", message);
382 ret = _send_event_ds(message);
388 message = strchr(app_type, '|') + 1;
389 _DEBUG_INFO("message :%s", message);
391 unsigned int outlen = 0;
392 unsigned char *out_message = g_base64_decode(message, &outlen);
394 int result = _dm_notification_operation((const char *)out_message, outlen);
395 _DEBUG_INFO("ip push parser : %d", result);
398 _DEBUG_INFO("push message null");
403 str_free(&pushmessage);
414 str_free(&pushmessage);
417 _DEBUG_INFO("end error ");
422 int dm_telephony_incomming_callback(int item_id, void *user_data)
426 _DEBUG_INFO("----------------------------------------------------incomming tel----------------------------------------------------");
428 DM_ERROR ret = DM_OK;
430 engine_status *status = NULL;
433 _DEBUG_INFO("dm db open = %d", ret); */
435 is_exist = IsExist_Engine_id(FUMO_SERVICE_ENGINE);
436 _DEBUG_INFO("is engine : %d", is_exist);
439 ret = Get_Engine_Status(FUMO_SERVICE_ENGINE, &status);
443 if (status != NULL) {
444 if (status->ui_mode != NULL) {
445 if (strcmp(status->ui_mode, OMADM_FUMO_BACKGROUND_UI_TYPE) != 0) {
447 if (status->engine_status == DM_SERVICE_ING || status->engine_status == DM_SERVICE_UNKNOWN) {
448 _DEBUG_INFO("cancel fumo task id = %d ", status->task_id);
449 cancel_task(status->task_id);
450 _DEBUG_INFO("terminate ui");
451 terminate_oma_dm_ui(DM_ERR_NOT_FOUND, FUMO_SERVICE_ENGINE);
457 _DEBUG_INFO("back ground ui");
470 if (status != NULL) {
471 Free_Memory_Engine_Status(&status, 1);
483 if (status != NULL) {
484 Free_Memory_Engine_Status(&status, 1);
486 _DEBUG_INFO("ERROR END = %d", ret);
492 int dm_telephony_end_callback(int item_id, void *user_data)
496 _DEBUG_INFO("----------------------------------------------------end tel----------------------------------------------------");
498 DM_ERROR ret = DM_OK;
499 sync_agent_da_return_e err = SYNC_AGENT_DA_SUCCESS;
501 engine_status *status = NULL;
504 char *server_id = NULL;
507 _DEBUG_INFO("dm db open = %d", ret);
509 err = sync_agent_open_agent();
510 _DEBUG_INFO("sync agent db open = %d", ret);
512 is_exist = IsExist_Engine_id(FUMO_SERVICE_ENGINE);
513 _DEBUG_INFO("is engine : %d", is_exist);
521 ret = Get_Engine_Status(FUMO_SERVICE_ENGINE, &status);
525 _DEBUG_INFO("sync agent db close = %d", ret);
528 Free_Memory_Engine_Status(&status, 1);
535 if (status != NULL && status->ui_mode != NULL) {
536 if (!strcmp(status->ui_mode, OMADM_FUMO_BACKGROUND_UI_TYPE)) {
538 is_alarm = check_existed_fumo_reminder_interval();
540 _DEBUG_INFO("have alarm");
544 ret = get_Serverid(SAMSUNG_FUMO_TYPE, &server_id);
548 err = sync_agent_close_agent();
549 _DEBUG_INFO("sync agent db close = %d", ret);
550 Free_Memory_Engine_Status(&status, 1);
555 if (server_id != NULL) {
556 //current time > alarm time
557 Event_Contents *ev_data = (Event_Contents *) calloc(1, sizeof(Event_Contents));
558 ev_data->type = UI_EVENT;
559 ev_data->session_id = NULL;
560 ev_data->server_id = server_id;
561 ev_data->noti_type = NOTI_TYPE_USERINTERACTION;
562 ev_data->ui_mode = strdup(OMADM_FUMO_NOTI_UI_TYPE);
564 ret = dm_fumo_common_task_request(ev_data);
567 err = sync_agent_close_agent();
568 _DEBUG_INFO("sync agent db close = %d", ret);
569 Free_Memory_Engine_Status(&status, 1);
574 _DEBUG_INFO("server id is null");
586 err = sync_agent_close_agent();
587 _DEBUG_INFO("sync agent db close = %d", ret);
588 Free_Memory_Engine_Status(&status, 1);
594 int network_on_callback()
597 _DEBUG_INFO("network on");
602 int network_off_callback()
605 _DEBUG_INFO("network off");
610 int network_change_callback()
615 _DEBUG_INFO("changed network");
626 _DEBUG_INFO("wifi only off mode download");
627 } else if (config == 1) {
628 ret = get_wifi_state();
629 _DEBUG_INFO("wifi only mode : %d", ret);
630 if (ret != SYNC_AGENT_NA_SUCCESS) {
634 ret = auto_operate_service_engine();
636 _DEBUG_INFO("error : %d", ret);
645 int alarm_callback(int item_id, void *user_data)
648 _DEBUG_INFO("#######Scheduler Send Msg Success!!!!!########## : %d", item_id);
650 DM_ERROR ret = DM_OK;
655 sync_agent_da_return_e result = SYNC_AGENT_DA_SUCCESS;
656 sync_agent_da_config_s *config = NULL;
660 db_ret = sync_agent_open_agent();
662 result = sync_agent_is_exist_config(FUMO_INTERVAL_TYPE, FUMO_INTERVAL, &exist);
663 if (result != SYNC_AGENT_DA_SUCCESS) {
668 _DEBUG_INFO("exist : %d", exist);
671 result = sync_agent_get_config_list(FUMO_INTERVAL_TYPE, &list);
672 count = g_list_length(list);
673 _DEBUG_INFO("count : %d", count);
674 if (count != 0 && list != NULL) {
675 config = (sync_agent_da_config_s *) g_list_nth_data(list, 0);
676 if (chartoint(config->value, &value) == 1) {
677 if (value == item_id) {
678 ret = _fumo_interval_alarm(item_id);
680 sync_agent_free_config_list(list);
689 sync_agent_free_config_list(list);
693 result = sync_agent_remove_service_data(1, item_id);
694 _DEBUG_INFO("delete alarm %d", result);
698 result = sync_agent_is_exist_config(FUMO_ACCOUNT_ALARM_TYPE, FUMO_ACCOUNT_ALARM, &exist);
699 if (result != SYNC_AGENT_DA_SUCCESS) {
704 _DEBUG_INFO("exist : %d", exist);
707 result = sync_agent_get_config_list(FUMO_ACCOUNT_ALARM_TYPE, &list);
708 count = g_list_length(list);
709 _DEBUG_INFO("count : %d", count);
710 if (count != 0 && list != NULL) {
711 config = (sync_agent_da_config_s *) g_list_nth_data(list, 0);
712 if (chartoint(config->value, &value) == 1) {
713 if (value == item_id) {
714 ret = _fumo_account_registration_alarm(item_id);
716 sync_agent_free_config_list(list);
725 sync_agent_free_config_list(list);
729 result = sync_agent_is_exist_config(LAWMO_ACCOUNT_ALARM_TYPE, LAWMO_ACCOUNT_ALARM, &exist);
730 if (result != SYNC_AGENT_DA_SUCCESS) {
735 _DEBUG_INFO("exist : %d", exist);
738 result = sync_agent_get_config_list(LAWMO_ACCOUNT_ALARM_TYPE, &list);
739 count = g_list_length(list);
740 _DEBUG_INFO("count : %d", count);
741 if (count != 0 && list != NULL) {
742 config = (sync_agent_da_config_s *) g_list_nth_data(list, 0);
743 if (chartoint(config->value, &value) == 1) {
744 if (value == item_id) {
745 ret = _lawmo_account_registration_alarm(item_id);
747 sync_agent_free_config_list(list);
756 sync_agent_free_config_list(list);
760 db_ret = sync_agent_close_agent();
761 _DEBUG_INFO("CLOSE DACI : %d", db_ret);
767 static DM_ERROR _fumo_interval_alarm(int item_id)
771 DM_ERROR ret = DM_OK;
772 char *server_id = NULL;
773 engine_status *status = NULL;
774 Event_Contents *ev_data = NULL;
778 _DEBUG_TRACE("status db : %d", ret);
781 * check samsung dm acc
783 ret = is_exist_dmacc(SAMSUNG_FUMO_TYPE, &is_exist);
784 if (ret != DM_OK || is_exist == 0) {
785 _DEBUG_TRACE("is exist dmacc error : %d or not exist dm acc : %d", ret, is_exist);
789 if (IsExist_Engine_id(FUMO_SERVICE_ENGINE) != 0) {
790 ret = Get_Engine_Status(FUMO_SERVICE_ENGINE, &status);
794 _DEBUG_TRACE(" result =[%d]\n", ret);
795 /*update engine_status */
796 if (status != NULL) {
797 if (status->server_id != NULL) {
798 server_id = strdup(status->server_id);
801 status->engine_status = DM_SERVICE_ING;
802 if (status->download_click == RESUME_STATUS_INSTALL_IDLE) {
803 status->download_click = RESUME_STATUS_INSTALL;
804 } else if (status->download_click == RESUME_STATUS_DOWNLOAD_IDLE) {
805 status->download_click = RESUME_STATUS_DOWNLOAD;
807 status->download_click = RESUME_STATUS_DOWNLOAD;
810 ret = Update_Engine_Status(status);
811 _DEBUG_TRACE(" update engine status : %d \n", ret);
815 Free_Memory_Engine_Status(&status, 1);
821 /*************************************************/
823 if (server_id == NULL) {
824 ret = get_Serverid(SAMSUNG_FUMO_TYPE, &server_id);
825 if (ret != DM_OK || server_id == NULL)
829 ev_data = (Event_Contents *) calloc(1, sizeof(Event_Contents));
830 if (ev_data == NULL) {
831 _DEBUG_TRACE("calloc failed !!");
832 ret = COMMON_ERR_ALLOC;
835 ev_data->type = UI_EVENT;
836 ev_data->session_id = NULL;
837 ev_data->server_id = strdup(server_id);
838 ev_data->noti_type = NOTI_TYPE_USERINTERACTION;
839 ev_data->ui_mode = strdup(OMADM_FUMO_NOTI_UI_TYPE);
841 _DEBUG_TRACE("alarm : %s", ev_data->server_id);
842 ret = dm_fumo_common_task_request(ev_data);
847 str_free(&server_id);
853 str_free(&server_id);
854 event_data_free((void *)ev_data);
858 Free_Memory_Engine_Status(&status, 1);
860 _DEBUG_TRACE("end error : %d", ret);
865 static DM_ERROR _fumo_account_registration_alarm(int item_id)
869 DM_ERROR ret = DM_OK;
871 ret = register_fota_account();
873 _DEBUG_TRACE("fail register fota account : %d ", ret);
874 ret = DM_ERR_FOTA_ACCOUNT_REGISTRATION;
876 _DEBUG_TRACE("success register fota account : %d ", ret);
883 static DM_ERROR _lawmo_account_registration_alarm(int item_id)
887 DM_ERROR ret = DM_OK;
889 ret = register_lawmo_account(item_id, NULL);
891 _DEBUG_TRACE("fail register lawmo account : %d ", ret);
892 ret = DM_ERR_LAWMO_ACCOUNT_REGISTRATION;
894 _DEBUG_TRACE("success register lawmo account : %d ", ret);
901 static DM_ERROR _send_event_ds(char *event_msg)
907 struct sockaddr_un clientaddr;
911 retvm_if((event_msg) == NULL, DM_ERR_EVENT_DS, "event_msg is NULL!!");
913 msg = strchr(event_msg, '|') + 1;
914 _DEBUG_TRACE("msg = %s", msg);
916 sync_agent_event_data_s *event = sync_agent_create_event(event_type);
918 _DEBUG_TRACE("event is NULL");
920 return DM_ERR_EVENT_DS;
923 sync_agent_append_event_data_param(event, SYNC_AGENT_EVENT_PARAM_TYPE_STRING, msg);
925 client_sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
926 if (client_sockfd == -1) {
927 _DEBUG_TRACE("socket create Error!!");
928 sync_agent_free_event(event);
930 return DM_ERR_EVENT_DS;
933 bzero(&clientaddr, sizeof(clientaddr));
934 clientaddr.sun_family = AF_UNIX;
938 str_len = g_strlcpy(clientaddr.sun_path, IPC_DS, (int)sizeof(clientaddr.sun_path));
939 if (str_len >= sizeof(clientaddr.sun_path)) {
940 _DEBUG_TRACE("buffer overflow");
941 sync_agent_free_event(event);
942 close(client_sockfd);
944 return CP_ERROR_FAIL;
947 client_len = sizeof(clientaddr);
949 if (connect(client_sockfd, (struct sockaddr *)&clientaddr, client_len) < 0) {
950 _DEBUG_TRACE("socket connect error");
951 sync_agent_free_event(event);
952 close(client_sockfd);
954 return DM_ERR_EVENT_DS;
957 int send_data_size = (event->data - event->size) + 1;
958 int write_ret = write(client_sockfd, (void *)(event->size), send_data_size);
959 _DEBUG_TRACE("write ret : %d", write_ret);
960 close(client_sockfd);
961 sync_agent_free_event(event);
967 void event_data_free(void *event_data)
971 retm_if((event_data) == NULL, "event_data is NULL!!");
973 Event_Contents *pEvent_data = (Event_Contents *) event_data;
975 pEvent_data->type = 0;
976 pEvent_data->noti_type = 0;
977 str_free(&(pEvent_data->server_id));
978 str_free(&(pEvent_data->session_id));
979 str_free(&(pEvent_data->ui_mode));