diff options
author | Jinkun Jang <jinkun.jang@samsung.com> | 2013-03-16 01:18:13 +0900 |
---|---|---|
committer | Jinkun Jang <jinkun.jang@samsung.com> | 2013-03-16 01:18:13 +0900 |
commit | 2928ee51d097094087c5a6445bea90840f6f1db6 (patch) | |
tree | 2322cd9266510a98abd61e1a8d7fb9f593665eff /src/agent/framework/event/oma_ds_event_handler.c | |
parent | d6aa47559c38d7e20d6d6a7a3671fa48ed58b9eb (diff) | |
download | oma-ds-agent-2928ee51d097094087c5a6445bea90840f6f1db6.tar.gz oma-ds-agent-2928ee51d097094087c5a6445bea90840f6f1db6.tar.bz2 oma-ds-agent-2928ee51d097094087c5a6445bea90840f6f1db6.zip |
merge with master
Diffstat (limited to 'src/agent/framework/event/oma_ds_event_handler.c')
-rwxr-xr-x | src/agent/framework/event/oma_ds_event_handler.c | 246 |
1 files changed, 119 insertions, 127 deletions
diff --git a/src/agent/framework/event/oma_ds_event_handler.c b/src/agent/framework/event/oma_ds_event_handler.c index 01d5102..94eeb97 100755 --- a/src/agent/framework/event/oma_ds_event_handler.c +++ b/src/agent/framework/event/oma_ds_event_handler.c @@ -57,30 +57,28 @@ int event_callback_add_profile_sync(sync_agent_event_data_s * request, sync_agen { _EXTERN_FUNC_ENTER; - char *profile_dir_name = NULL; char *profile_name = NULL; char *addr = NULL; char *id = NULL; char *password = NULL; - char *sync_mode = NULL; - char *sync_type = NULL; - char *interval = NULL; - int category_count; + int sync_mode = 0; + int sync_type = 0; + int interval = 0; + int category_count = 0; int result = 0; - int account_id; + int account_id = 0; GList *categorys = NULL; GList *iter = NULL; - sync_agent_get_event_data_param(request, &profile_dir_name); - sync_agent_get_event_data_param(request, &profile_name); - sync_agent_get_event_data_param(request, &addr); - sync_agent_get_event_data_param(request, &id); - sync_agent_get_event_data_param(request, &password); - sync_agent_get_event_data_param(request, &sync_mode); - sync_agent_get_event_data_param(request, &sync_type); - sync_agent_get_event_data_param(request, &interval); - sync_agent_get_event_data_param(request, &category_count); + sync_agent_get_event_data_param_str(request, &profile_name); + sync_agent_get_event_data_param_str(request, &addr); + sync_agent_get_event_data_param_str(request, &id); + sync_agent_get_event_data_param_str(request, &password); + sync_agent_get_event_data_param_int(request, (int*)&sync_mode); + sync_agent_get_event_data_param_int(request, (int*)&sync_type); + sync_agent_get_event_data_param_int(request, (int*)&interval); + sync_agent_get_event_data_param_int(request, &category_count); /* _DEBUG_INFO("request param : %s", profile_dir_name); @@ -100,39 +98,35 @@ int event_callback_add_profile_sync(sync_agent_event_data_s * request, sync_agen if (category == NULL) { _DEBUG_ERROR("category is NULL !"); - if (profile_dir_name != NULL) - free(profile_dir_name); - - if (profile_name != NULL) + if (profile_name != NULL) { free(profile_name); + profile_name = NULL; + } - if (addr != NULL) + if (addr != NULL) { free(addr); + addr = NULL; + } - if (id != NULL) + if (id != NULL) { free(id); + id = NULL; + } - if (password != NULL) + if (password != NULL) { free(password); - - if (sync_mode != NULL) - free(sync_mode); - - if (sync_type != NULL) - free(sync_type); - - if (interval != NULL) - free(interval); + password = NULL; + } return 0; } - sync_agent_get_event_data_param(request, &(category->service_type)); - sync_agent_get_event_data_param(request, &(category->enabled)); - sync_agent_get_event_data_param(request, &(category->src_uri)); - sync_agent_get_event_data_param(request, &(category->tgt_uri)); - sync_agent_get_event_data_param(request, &(category->id)); - sync_agent_get_event_data_param(request, &(category->password)); + sync_agent_get_event_data_param_int(request, (int*)&((category->service_type))); + sync_agent_get_event_data_param_int(request, &(category->enabled)); + sync_agent_get_event_data_param_int(request, (int*)&(category->src_uri)); + sync_agent_get_event_data_param_str(request, &(category->tgt_uri)); + sync_agent_get_event_data_param_str(request, &(category->id)); + sync_agent_get_event_data_param_str(request, &(category->password)); categorys = g_list_append(categorys, category); @@ -147,11 +141,11 @@ int event_callback_add_profile_sync(sync_agent_event_data_s * request, sync_agen } /* send to engine controller */ - void *in_param_value_array[9] = { &profile_dir_name, &profile_name, &addr, &id, &password, &sync_mode, &sync_type, &interval, &categorys }; - int in_param_index_array[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; - sync_agent_ec_value_type_e in_param_value_type_array[9] = { SYNC_AGENT_EC_VALUE_TYPE_STRUCT, SYNC_AGENT_EC_VALUE_TYPE_STRUCT, SYNC_AGENT_EC_VALUE_TYPE_STRUCT, - SYNC_AGENT_EC_VALUE_TYPE_STRUCT, SYNC_AGENT_EC_VALUE_TYPE_STRUCT, SYNC_AGENT_EC_VALUE_TYPE_STRUCT, - SYNC_AGENT_EC_VALUE_TYPE_STRUCT, SYNC_AGENT_EC_VALUE_TYPE_STRUCT, SYNC_AGENT_EC_VALUE_TYPE_STRUCT + void *in_param_value_array[8] = {&profile_name, &addr, &id, &password, &sync_mode, &sync_type, &interval, &categorys }; + int in_param_index_array[8] = { 0, 1, 2, 3, 4, 5, 6, 7}; + sync_agent_ec_value_type_e in_param_value_type_array[8] = {SYNC_AGENT_EC_VALUE_TYPE_STRUCT, SYNC_AGENT_EC_VALUE_TYPE_STRUCT, + SYNC_AGENT_EC_VALUE_TYPE_STRUCT, SYNC_AGENT_EC_VALUE_TYPE_STRUCT, SYNC_AGENT_EC_VALUE_TYPE_INT, + SYNC_AGENT_EC_VALUE_TYPE_INT, SYNC_AGENT_EC_VALUE_TYPE_INT, SYNC_AGENT_EC_VALUE_TYPE_STRUCT }; unsigned int request_msg_id = 0; @@ -159,7 +153,7 @@ int event_callback_add_profile_sync(sync_agent_event_data_s * request, sync_agen sync_agent_ec_task_error_e task_error = SYNC_AGENT_EC_TASK_ERROR_NOT_YET_RUN; sync_agent_ec_param_param_s **param_array = NULL; - sync_agent_request_sync_task(EC_MSG_TYPE_SYNC_TASK_ADD_PROFILE, 0, 9, in_param_index_array, in_param_value_type_array, in_param_value_array, (int *)&request_msg_id, &task_error, &out_param_count, ¶m_array); + sync_agent_request_sync_task(EC_MSG_TYPE_SYNC_TASK_ADD_PROFILE, 0, 8, in_param_index_array, in_param_value_type_array, in_param_value_array, (int *)&request_msg_id, &task_error, &out_param_count, ¶m_array); sync_agent_get_param_value(&(param_array[0]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &result); sync_agent_get_param_value(&(param_array[1]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &account_id); @@ -170,8 +164,10 @@ int event_callback_add_profile_sync(sync_agent_event_data_s * request, sync_agen for (iter = categorys; iter != NULL; iter = g_list_next(iter)) { sync_service_s *category = (sync_service_s *) iter->data; - if (category != NULL) + if (category != NULL) { free_sync_service(category); + category = NULL; + } } _EXTERN_FUNC_EXIT; @@ -187,16 +183,16 @@ int event_callback_edit_profile_sync(sync_agent_event_data_s * request, sync_age char *addr = NULL; char *id = NULL; char *password = NULL; - char *sync_mode = NULL; - char *sync_type = NULL; - char *interval = NULL; - int category_count; + int sync_mode = 0; + int sync_type = 0; + int interval = 0; + int category_count = 0; int result = 0; GList *categorys = NULL; GList *iter = NULL; - sync_agent_get_event_data_param(request, &profile_dir_name); + sync_agent_get_event_data_param_str(request, &profile_dir_name); if (profile_dir_name == NULL) { _DEBUG_ERROR("profile_dir_name is not defined"); result = 0; @@ -206,22 +202,22 @@ int event_callback_edit_profile_sync(sync_agent_event_data_s * request, sync_age int account_id = get_account_id(profile_dir_name, false); - sync_agent_get_event_data_param(request, &profile_name); - sync_agent_get_event_data_param(request, &addr); - sync_agent_get_event_data_param(request, &id); - sync_agent_get_event_data_param(request, &password); - sync_agent_get_event_data_param(request, &sync_mode); - sync_agent_get_event_data_param(request, &sync_type); - sync_agent_get_event_data_param(request, &interval); - sync_agent_get_event_data_param(request, &category_count); + sync_agent_get_event_data_param_str(request, &profile_name); + sync_agent_get_event_data_param_str(request, &addr); + sync_agent_get_event_data_param_str(request, &id); + sync_agent_get_event_data_param_str(request, &password); + sync_agent_get_event_data_param_int(request, (int*)&sync_mode); + sync_agent_get_event_data_param_int(request, (int*)&sync_type); + sync_agent_get_event_data_param_int(request, (int*)&interval); + sync_agent_get_event_data_param_int(request, &category_count); _DEBUG_INFO("request param : %s", profile_name); _DEBUG_INFO("request param : %s", addr); _DEBUG_INFO("request param : %s", id); _DEBUG_INFO("request param : %s", password); - _DEBUG_INFO("request param : %s", sync_mode); - _DEBUG_INFO("request param : %s", sync_type); - _DEBUG_INFO("request param : %s", interval); + _DEBUG_INFO("request param : %d", sync_mode); + _DEBUG_INFO("request param : %d", sync_type); + _DEBUG_INFO("request param : %d", interval); _DEBUG_INFO("request param : %d", category_count); int i = 0; @@ -245,30 +241,21 @@ int event_callback_edit_profile_sync(sync_agent_event_data_s * request, sync_age if (password != NULL) free(password); - if (sync_mode != NULL) - free(sync_mode); - - if (sync_type != NULL) - free(sync_type); - - if (interval != NULL) - free(interval); - return 0; } - sync_agent_get_event_data_param(request, &(category->service_type)); - sync_agent_get_event_data_param(request, &(category->enabled)); - sync_agent_get_event_data_param(request, &(category->src_uri)); - sync_agent_get_event_data_param(request, &(category->tgt_uri)); - sync_agent_get_event_data_param(request, &(category->id)); - sync_agent_get_event_data_param(request, &(category->password)); + sync_agent_get_event_data_param_int(request, (int*)&(category->service_type)); + sync_agent_get_event_data_param_int(request, &(category->enabled)); + sync_agent_get_event_data_param_int(request, (int*)&(category->src_uri)); + sync_agent_get_event_data_param_str(request, &(category->tgt_uri)); + sync_agent_get_event_data_param_str(request, &(category->id)); + sync_agent_get_event_data_param_str(request, &(category->password)); categorys = g_list_append(categorys, category); _DEBUG_INFO("category[i]->content_type : %d", category->service_type); _DEBUG_INFO("category[i]->enabled : %d", category->enabled); - _DEBUG_INFO("category[i]->srcURI : %s", category->src_uri); + _DEBUG_INFO("category[i]->srcURI : %d", category->src_uri); _DEBUG_INFO("category[i]->tgtURI : %s", category->tgt_uri); _DEBUG_INFO("category[i]->id : %s", category->id); _DEBUG_INFO("category[i]->password : %s", category->password); @@ -278,8 +265,8 @@ int event_callback_edit_profile_sync(sync_agent_event_data_s * request, sync_age void *in_param_value_array[9] = { &account_id, &profile_name, &addr, &id, &password, &sync_mode, &sync_type, &interval, &categorys }; int in_param_index_array[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; sync_agent_ec_value_type_e in_param_value_type_array[9] = { SYNC_AGENT_EC_VALUE_TYPE_INT, SYNC_AGENT_EC_VALUE_TYPE_STRUCT, SYNC_AGENT_EC_VALUE_TYPE_STRUCT, - SYNC_AGENT_EC_VALUE_TYPE_STRUCT, SYNC_AGENT_EC_VALUE_TYPE_STRUCT, SYNC_AGENT_EC_VALUE_TYPE_STRUCT, - SYNC_AGENT_EC_VALUE_TYPE_STRUCT, SYNC_AGENT_EC_VALUE_TYPE_STRUCT, SYNC_AGENT_EC_VALUE_TYPE_STRUCT + SYNC_AGENT_EC_VALUE_TYPE_STRUCT, SYNC_AGENT_EC_VALUE_TYPE_STRUCT, SYNC_AGENT_EC_VALUE_TYPE_INT, + SYNC_AGENT_EC_VALUE_TYPE_INT, SYNC_AGENT_EC_VALUE_TYPE_INT, SYNC_AGENT_EC_VALUE_TYPE_STRUCT }; unsigned int request_msg_id = 0; @@ -315,7 +302,7 @@ int event_callback_delete_profile_sync(sync_agent_event_data_s * request, sync_a int result = 0; int count; - sync_agent_get_event_data_param(request, &count); + sync_agent_get_event_data_param_int(request, &count); GList *profiles = NULL; int *account_id = 0; @@ -327,7 +314,7 @@ int event_callback_delete_profile_sync(sync_agent_event_data_s * request, sync_a profile = NULL; } - sync_agent_get_event_data_param(request, &profile); + sync_agent_get_event_data_param_str(request, &profile); if (profile == NULL) { _DEBUG_ERROR("profile is not defined"); result = 0; @@ -378,7 +365,7 @@ int event_callback_request_sync_sync(sync_agent_event_data_s * request, sync_age char *profile = NULL; int result = 0; - sync_agent_get_event_data_param(request, &profile); + sync_agent_get_event_data_param_str(request, &profile); if (profile == NULL) { _DEBUG_ERROR("profile is not defined"); result = 0; @@ -415,7 +402,7 @@ int event_callback_cancel_sync_sync(sync_agent_event_data_s * request, sync_agen int result = 0; bool res; - sync_agent_get_event_data_param(request, &profile); + sync_agent_get_event_data_param_str(request, &profile); if (profile == NULL) { _DEBUG_ERROR("profile is not defined"); result = 0; @@ -451,13 +438,13 @@ int event_callback_get_profile_data_sync(sync_agent_event_data_s * request, sync char *addr = NULL; char *id = NULL; char *password = NULL; - char *sync_mode = NULL; - char *sync_type = NULL; - char *interval = NULL; + int sync_mode = 0; + int sync_type = 0; + int interval = 0; int last_session_status = 0; int last_session_time = 0; - sync_agent_get_event_data_param(request, &profile); + sync_agent_get_event_data_param_str(request, &profile); if (profile == NULL) { _DEBUG_ERROR("profile is not defined"); result = 0; @@ -484,9 +471,9 @@ int event_callback_get_profile_data_sync(sync_agent_event_data_s * request, sync sync_agent_get_param_value(&(param_array[2]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &addr); sync_agent_get_param_value(&(param_array[3]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &id); sync_agent_get_param_value(&(param_array[4]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &password); - sync_agent_get_param_value(&(param_array[5]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &sync_mode); - sync_agent_get_param_value(&(param_array[6]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &sync_type); - sync_agent_get_param_value(&(param_array[7]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &interval); + sync_agent_get_param_value(&(param_array[5]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &sync_mode); + sync_agent_get_param_value(&(param_array[6]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &sync_type); + sync_agent_get_param_value(&(param_array[7]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &interval); sync_agent_get_param_value(&(param_array[8]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &last_session_status); sync_agent_get_param_value(&(param_array[9]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &last_session_time); @@ -497,14 +484,16 @@ int event_callback_get_profile_data_sync(sync_agent_event_data_s * request, sync sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_STRING, (void *)addr); sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_STRING, (void *)id); sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_STRING, (void *)password); - sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_STRING, (void *)sync_mode); - sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_STRING, (void *)sync_type); - sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_STRING, (void *)interval); + sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_INTEGER, &sync_mode); + sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_INTEGER, &sync_type); + sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_INTEGER, &interval); sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_INTEGER, &last_session_status); sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_INTEGER, &last_session_time); - if (profile != NULL) + if (profile != NULL) { free(profile); + profile = NULL; + } _EXTERN_FUNC_EXIT; return 0; @@ -522,14 +511,14 @@ int event_callback_get_profile_sync_category_sync(sync_agent_event_data_s * requ char *password = NULL; int result = 0; - sync_agent_get_event_data_param(request, &profile); + sync_agent_get_event_data_param_str(request, &profile); if (profile == NULL) { _DEBUG_ERROR("profile is not defined"); result = 0; goto error; } - sync_agent_get_event_data_param(request, &content_type); + sync_agent_get_event_data_param_int(request, &content_type); _DEBUG_INFO("request param : %s", profile); _DEBUG_INFO("request param : %d", content_type); @@ -550,7 +539,7 @@ int event_callback_get_profile_sync_category_sync(sync_agent_event_data_s * requ sync_agent_get_param_value(&(param_array[0]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &result); sync_agent_get_param_value(&(param_array[1]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &enabled); - sync_agent_get_param_value(&(param_array[2]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &srcURI); + sync_agent_get_param_value(&(param_array[2]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &srcURI); sync_agent_get_param_value(&(param_array[3]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &tgtURI); sync_agent_get_param_value(&(param_array[4]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &id); sync_agent_get_param_value(&(param_array[5]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &password); @@ -566,7 +555,7 @@ int event_callback_get_profile_sync_category_sync(sync_agent_event_data_s * requ sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_INTEGER, &result); sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_INTEGER, &enabled); - sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_STRING, (void *)srcURI); + sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_INTEGER, &srcURI); sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_STRING, (void *)tgtURI); sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_STRING, (void *)id); sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_STRING, (void *)password); @@ -598,14 +587,14 @@ int event_callback_get_profile_last_statistics_sync(sync_agent_event_data_s * re int client2Server_NrOfReplace = 0; int result = 0; - sync_agent_get_event_data_param(request, &profile); + sync_agent_get_event_data_param_str(request, &profile); if (profile == NULL) { _DEBUG_ERROR("profile is not defined"); result = 0; goto error; } - sync_agent_get_event_data_param(request, &content_type); + sync_agent_get_event_data_param_int(request, &content_type); _DEBUG_INFO("request param : %s", profile); _DEBUG_INFO("request param : %d", content_type); @@ -678,15 +667,15 @@ int event_callback_add_profile_cp_sync(sync_agent_event_data_s * request, sync_a char *addr = NULL; char *id = NULL; char *password = NULL; - int category_count; + int category_count = 0; int result = 0; - int account_id; + int account_id = 0; - sync_agent_get_event_data_param(request, &profile_name); - sync_agent_get_event_data_param(request, &addr); - sync_agent_get_event_data_param(request, &id); - sync_agent_get_event_data_param(request, &password); - sync_agent_get_event_data_param(request, &category_count); + sync_agent_get_event_data_param_str(request, &profile_name); + sync_agent_get_event_data_param_str(request, &addr); + sync_agent_get_event_data_param_str(request, &id); + sync_agent_get_event_data_param_str(request, &password); + sync_agent_get_event_data_param_int(request, &category_count); /* _DEBUG_INFO("request param : %s", profile_name); @@ -705,25 +694,29 @@ int event_callback_add_profile_cp_sync(sync_agent_event_data_s * request, sync_a if (profile_name != NULL) free(profile_name); + profile_name = NULL; if (addr != NULL) free(addr); + addr = NULL; if (id != NULL) free(id); + id = NULL; if (password != NULL) free(password); + password = NULL; return 0; } - sync_agent_get_event_data_param(request, &(category->name)); - sync_agent_get_event_data_param(request, &(category->accept)); - sync_agent_get_event_data_param(request, &(category->id)); - sync_agent_get_event_data_param(request, &(category->password)); - sync_agent_get_event_data_param(request, &(category->auth_type)); - sync_agent_get_event_data_param(request, &(category->auth_data)); + sync_agent_get_event_data_param_str(request, &(category->name)); + sync_agent_get_event_data_param_str(request, &(category->accept)); + sync_agent_get_event_data_param_str(request, &(category->id)); + sync_agent_get_event_data_param_str(request, &(category->password)); + sync_agent_get_event_data_param_str(request, &(category->auth_type)); + sync_agent_get_event_data_param_str(request, &(category->auth_data)); categorys = g_list_append(categorys, category); @@ -767,17 +760,16 @@ int event_callback_request_calllog_sync_async(sync_agent_event_data_s * request, char *data = NULL; int result = 0; - sync_agent_get_event_data_param(request, &data); + sync_agent_get_event_data_param_str(request, &data); if (data == NULL) { _DEBUG_ERROR("data is NULL"); result = 0; - goto error; + } else { + _DEBUG_INFO("data = %s", data); + result = send_ip_push_sync_msg(data); + free(data); + data = NULL; } - _DEBUG_INFO("data = %s", data); - - result = send_ip_push_sync_msg(data); - - error: sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_INTEGER, &result); @@ -857,9 +849,9 @@ int event_callback_request_get_all_profiles_data(sync_agent_event_data_s * reque sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_STRING, (void *)server_info->id); sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_STRING, (void *)server_info->password); - sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_STRING, (void *)sync_info->sync_mode); - sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_STRING, (void *)sync_info->sync_type); - sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_STRING, (void *)sync_info->interval); + sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_INTEGER, &sync_info->sync_mode); + sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_INTEGER, &sync_info->sync_type); + sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_INTEGER, &sync_info->interval); sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_INTEGER, &profile_info->last_sync_status); sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_INTEGER, &profile_info->last_sync_time); @@ -871,9 +863,9 @@ int event_callback_request_get_all_profiles_data(sync_agent_event_data_s * reque _DEBUG_INFO("server_info->id = %s", server_info->id); _DEBUG_INFO("server_info->password = %s", server_info->password); - _DEBUG_INFO("sync_info->sync_mode = %s", sync_info->sync_mode); - _DEBUG_INFO("sync_info->sync_type = %s", sync_info->sync_type); - _DEBUG_INFO("sync_info->interval = %s", sync_info->interval); + _DEBUG_INFO("sync_info->sync_mode = %d", sync_info->sync_mode); + _DEBUG_INFO("sync_info->sync_type = %d", sync_info->sync_type); + _DEBUG_INFO("sync_info->interval = %d", sync_info->interval); _DEBUG_INFO("profile_info->last_sync_status = %d", profile_info->last_sync_status); _DEBUG_INFO("profile_info->last_sync_time = %d", profile_info->last_sync_time); @@ -888,14 +880,14 @@ int event_callback_request_get_all_profiles_data(sync_agent_event_data_s * reque sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_INTEGER, &category_info->service_type); sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_INTEGER, &category_info->enabled); - sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_STRING, (void *)category_info->src_uri); + sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_INTEGER, &category_info->src_uri); sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_STRING, (void *)category_info->tgt_uri); sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_STRING, (void *)category_info->id); sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_STRING, (void *)category_info->password); _DEBUG_INFO("category_info->service_type = %d", category_info->service_type); _DEBUG_INFO("category_info->enabled = %d", category_info->enabled); - _DEBUG_INFO("category_info->src_uri = %s", category_info->src_uri); + _DEBUG_INFO("category_info->src_uri = %d", category_info->src_uri); _DEBUG_INFO("category_info->tgt_uri = %s", category_info->tgt_uri); _DEBUG_INFO("category_info->id = %s", category_info->id); _DEBUG_INFO("category_info->password = %s", category_info->password); |