summaryrefslogtreecommitdiff
path: root/src/agent/framework
diff options
context:
space:
mode:
authorJinkun Jang <jinkun.jang@samsung.com>2013-03-16 01:18:13 +0900
committerJinkun Jang <jinkun.jang@samsung.com>2013-03-16 01:18:13 +0900
commit2928ee51d097094087c5a6445bea90840f6f1db6 (patch)
tree2322cd9266510a98abd61e1a8d7fb9f593665eff /src/agent/framework
parentd6aa47559c38d7e20d6d6a7a3671fa48ed58b9eb (diff)
downloadoma-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')
-rwxr-xr-xsrc/agent/framework/event/oma_ds_event_handler.c246
-rwxr-xr-xsrc/agent/framework/event/oma_ds_platform_event_handler.c4
-rwxr-xr-xsrc/agent/framework/task/oma_ds_engine_controller_task.c114
3 files changed, 171 insertions, 193 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, &param_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, &param_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);
diff --git a/src/agent/framework/event/oma_ds_platform_event_handler.c b/src/agent/framework/event/oma_ds_platform_event_handler.c
index ddc3547..31053ca 100755
--- a/src/agent/framework/event/oma_ds_platform_event_handler.c
+++ b/src/agent/framework/event/oma_ds_platform_event_handler.c
@@ -330,8 +330,8 @@ int send_ip_push_sync_msg(char *data)
if (server_id != NULL)
free(server_id);
- if (pSanPackage != NULL)
- sanPackageParserFree((void *)pSanPackage);
+// if (pSanPackage != NULL)
+// sanPackageParserFree((void *)pSanPackage);
sync_agent_close_agent();
diff --git a/src/agent/framework/task/oma_ds_engine_controller_task.c b/src/agent/framework/task/oma_ds_engine_controller_task.c
index ba7012d..6638e65 100755
--- a/src/agent/framework/task/oma_ds_engine_controller_task.c
+++ b/src/agent/framework/task/oma_ds_engine_controller_task.c
@@ -177,35 +177,30 @@ sync_agent_ec_task_spec_s *make_add_profile_task()
{
_EXTERN_FUNC_ENTER;
- sync_agent_ec_param_spec_s *pParam_spec1 = sync_agent_alloc_param_spec_structure("profileDirName", _string_copy_struct, free,
- true, false, false, NULL, false, NULL, false, NULL);
- sync_agent_ec_param_spec_s *pParam_spec2 = sync_agent_alloc_param_spec_structure("profileName", _string_copy_struct, free,
- true, false, false, NULL, false, NULL, false, NULL);
- sync_agent_ec_param_spec_s *pParam_spec3 = sync_agent_alloc_param_spec_structure("addr", _string_copy_struct, free,
- true, false, false, NULL, false, NULL, false, NULL);
- sync_agent_ec_param_spec_s *pParam_spec4 = sync_agent_alloc_param_spec_structure("id", _string_copy_struct, free,
- true, false, false, NULL, false, NULL, false, NULL);
- sync_agent_ec_param_spec_s *pParam_spec5 = sync_agent_alloc_param_spec_structure("password", _string_copy_struct, free,
+ sync_agent_ec_param_spec_s *pParam_spec1 = sync_agent_alloc_param_spec_structure("profileName", _string_copy_struct, free,
true, false, false, NULL, false, NULL, false, NULL);
- sync_agent_ec_param_spec_s *pParam_spec6 = sync_agent_alloc_param_spec_structure("syncMode", _string_copy_struct, free,
+ sync_agent_ec_param_spec_s *pParam_spec2 = sync_agent_alloc_param_spec_structure("addr", _string_copy_struct, free,
true, false, false, NULL, false, NULL, false, NULL);
- sync_agent_ec_param_spec_s *pParam_spec7 = sync_agent_alloc_param_spec_structure("syncType", _string_copy_struct, free,
+ sync_agent_ec_param_spec_s *pParam_spec3 = sync_agent_alloc_param_spec_structure("id", _string_copy_struct, free,
true, false, false, NULL, false, NULL, false, NULL);
- sync_agent_ec_param_spec_s *pParam_spec8 = sync_agent_alloc_param_spec_structure("interval", _string_copy_struct, free,
+ sync_agent_ec_param_spec_s *pParam_spec4 = sync_agent_alloc_param_spec_structure("password", _string_copy_struct, free,
true, false, false, NULL, false, NULL, false, NULL);
- sync_agent_ec_param_spec_s *pParam_spec9 = sync_agent_alloc_param_spec_structure("categories", NULL, _free_sync_categorie_list,
+ sync_agent_ec_param_spec_s *pParam_spec5 = sync_agent_alloc_param_spec_int("syncMode", true, false, false, 0, 0, false, 0, false, 0, 0);
+ sync_agent_ec_param_spec_s *pParam_spec6 = sync_agent_alloc_param_spec_int("syncType", true, false, false, 0, 0, false, 0, false, 0, 0);
+ sync_agent_ec_param_spec_s *pParam_spec7 = sync_agent_alloc_param_spec_int("interval", true, false, false, 0, 0, false, 0, false, 0, 0);
+ sync_agent_ec_param_spec_s *pParam_spec8 = sync_agent_alloc_param_spec_structure("categories", NULL, _free_sync_categorie_list,
true, false, false, NULL, false, NULL, false, NULL);
- sync_agent_ec_param_spec_s *pParam_spec10 = sync_agent_alloc_param_spec_int("result", false, true, false, 0, 0, false, 0, false, 0, 0);
- sync_agent_ec_param_spec_s *pParam_spec11 = sync_agent_alloc_param_spec_int("accountId", false, true, false, 0, 0, false, 0, false, 0, 0);
+ sync_agent_ec_param_spec_s *pParam_spec9 = sync_agent_alloc_param_spec_int("result", false, true, false, 0, 0, false, 0, false, 0, 0);
+ sync_agent_ec_param_spec_s *pParam_spec10 = sync_agent_alloc_param_spec_int("accountId", false, true, false, 0, 0, false, 0, false, 0, 0);
- sync_agent_ec_param_spec_s *param_spec_array[11] = { pParam_spec1, pParam_spec2, pParam_spec3, pParam_spec4, pParam_spec5,
- pParam_spec6, pParam_spec7, pParam_spec8, pParam_spec9, pParam_spec10, pParam_spec11
+ sync_agent_ec_param_spec_s *param_spec_array[10] = { pParam_spec1, pParam_spec2, pParam_spec3, pParam_spec4, pParam_spec5,
+ pParam_spec6, pParam_spec7, pParam_spec8, pParam_spec9, pParam_spec10
};
sync_agent_ec_task_spec_s *pTask_spec = sync_agent_alloc_simple_task_spec("add_profile",
add_profile_task_process, NULL, NULL,
- 11, param_spec_array);
+ 10, param_spec_array);
sync_agent_unref_param_spec(pParam_spec1);
sync_agent_unref_param_spec(pParam_spec2);
@@ -217,7 +212,6 @@ sync_agent_ec_task_spec_s *make_add_profile_task()
sync_agent_unref_param_spec(pParam_spec8);
sync_agent_unref_param_spec(pParam_spec9);
sync_agent_unref_param_spec(pParam_spec10);
- sync_agent_unref_param_spec(pParam_spec11);
_EXTERN_FUNC_EXIT;
return pTask_spec;
@@ -236,12 +230,9 @@ sync_agent_ec_task_spec_s *make_edit_profile_task()
true, false, false, NULL, false, NULL, false, NULL);
sync_agent_ec_param_spec_s *pParam_spec5 = sync_agent_alloc_param_spec_structure("password", _string_copy_struct, free,
true, false, false, NULL, false, NULL, false, NULL);
- sync_agent_ec_param_spec_s *pParam_spec6 = sync_agent_alloc_param_spec_structure("syncMode", _string_copy_struct, free,
- true, false, false, NULL, false, NULL, false, NULL);
- sync_agent_ec_param_spec_s *pParam_spec7 = sync_agent_alloc_param_spec_structure("syncType", _string_copy_struct, free,
- true, false, false, NULL, false, NULL, false, NULL);
- sync_agent_ec_param_spec_s *pParam_spec8 = sync_agent_alloc_param_spec_structure("interval", _string_copy_struct, free,
- true, false, false, NULL, false, NULL, false, NULL);
+ sync_agent_ec_param_spec_s *pParam_spec6 = sync_agent_alloc_param_spec_int("syncMode", true, false, false, 0, 0, false, 0, false, 0, 0);
+ sync_agent_ec_param_spec_s *pParam_spec7 = sync_agent_alloc_param_spec_int("syncType", true, false, false, 0, 0, false, 0, false, 0, 0);
+ sync_agent_ec_param_spec_s *pParam_spec8 = sync_agent_alloc_param_spec_int("interval", true, false, false, 0, 0, false, 0, false, 0, 0);
sync_agent_ec_param_spec_s *pParam_spec9 = sync_agent_alloc_param_spec_structure("categories", NULL, _free_sync_categorie_list,
true, false, false, NULL, false, NULL, false, NULL);
@@ -297,6 +288,7 @@ sync_agent_ec_task_spec_s *make_get_profile_data_task()
_EXTERN_FUNC_ENTER;
sync_agent_ec_param_spec_s *pParam_spec1 = sync_agent_alloc_param_spec_int("accountId", true, false, false, 0, 0, false, 0, false, 0, 0);
+
sync_agent_ec_param_spec_s *pParam_spec2 = sync_agent_alloc_param_spec_int("result", false, true, false, 0, 0, false, 0, false, 0, 0);
sync_agent_ec_param_spec_s *pParam_spec3 = sync_agent_alloc_param_spec_structure("profileName", _string_copy_struct, free,
false, true, false, NULL, false, NULL, false, NULL);
@@ -306,12 +298,9 @@ sync_agent_ec_task_spec_s *make_get_profile_data_task()
false, true, false, NULL, false, NULL, false, NULL);
sync_agent_ec_param_spec_s *pParam_spec6 = sync_agent_alloc_param_spec_structure("password", _string_copy_struct, free,
false, true, false, NULL, false, NULL, false, NULL);
- sync_agent_ec_param_spec_s *pParam_spec7 = sync_agent_alloc_param_spec_structure("syncMode", _string_copy_struct, free,
- false, true, false, NULL, false, NULL, false, NULL);
- sync_agent_ec_param_spec_s *pParam_spec8 = sync_agent_alloc_param_spec_structure("syncType", _string_copy_struct, free,
- false, true, false, NULL, false, NULL, false, NULL);
- sync_agent_ec_param_spec_s *pParam_spec9 = sync_agent_alloc_param_spec_structure("interval", _string_copy_struct, free,
- false, true, false, NULL, false, NULL, false, NULL);
+ sync_agent_ec_param_spec_s *pParam_spec7 = sync_agent_alloc_param_spec_int("syncMode", false, true, false, 0, 0, false, 0, false, 0, 0);
+ sync_agent_ec_param_spec_s *pParam_spec8 = sync_agent_alloc_param_spec_int("syncType", false, true, false, 0, 0, false, 0, false, 0, 0);
+ sync_agent_ec_param_spec_s *pParam_spec9 = sync_agent_alloc_param_spec_int("interval", false, true, false, 0, 0, false, 0, false, 0, 0);
sync_agent_ec_param_spec_s *pParam_spec10 = sync_agent_alloc_param_spec_int("lastSessionStatus", false, true, false, 0, 0, false, 0, false, 0, 0);
sync_agent_ec_param_spec_s *pParam_spec11 = sync_agent_alloc_param_spec_int("lastSessionTime", false, true, false, 0, 0, false, 0, false, 0, 0);
@@ -349,8 +338,7 @@ sync_agent_ec_task_spec_s *make_get_profile_sync_category_task()
sync_agent_ec_param_spec_s *pParam_spec3 = sync_agent_alloc_param_spec_int("result", false, true, false, 0, 0, false, 0, false, 0, 0);
sync_agent_ec_param_spec_s *pParam_spec4 = sync_agent_alloc_param_spec_int("enabled", false, true, false, 0, 0, false, 0, false, 0, 0);
- sync_agent_ec_param_spec_s *pParam_spec5 = sync_agent_alloc_param_spec_structure("srcURI", _string_copy_struct, free,
- false, true, false, NULL, false, NULL, false, NULL);
+ sync_agent_ec_param_spec_s *pParam_spec5 = sync_agent_alloc_param_spec_int("srcURI", false, true, false, 0, 0, false, 0, false, 0, 0);
sync_agent_ec_param_spec_s *pParam_spec6 = sync_agent_alloc_param_spec_structure("tgtURI", _string_copy_struct, free,
false, true, false, NULL, false, NULL, false, NULL);
sync_agent_ec_param_spec_s *pParam_spec7 = sync_agent_alloc_param_spec_structure("id", _string_copy_struct, free,
@@ -574,39 +562,37 @@ sync_agent_ec_task_error_e add_profile_task_process(unsigned int param_cnt, sync
sync_agent_ec_task_error_e err = SYNC_AGENT_EC_TASK_ERROR_RUN_SUCCESS;
- char *profileDirName = NULL;
char *profileName = NULL;
char *addr = NULL;
char *id = NULL;
char *password = NULL;
- char *syncMode = NULL;
- char *syncType = NULL;
- char *interval = NULL;
+ int syncMode = 0;
+ int syncType = 0;
+ int interval = 0;
GList *categories = NULL;
int accountId;
bool res;
int result;
- sync_agent_get_param_value(&(param_array[0]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &profileDirName);
- sync_agent_get_param_value(&(param_array[1]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &profileName);
- 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, &syncMode);
- sync_agent_get_param_value(&(param_array[6]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &syncType);
- sync_agent_get_param_value(&(param_array[7]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &interval);
- sync_agent_get_param_value(&(param_array[8]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &categories);
+ sync_agent_get_param_value(&(param_array[0]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &profileName);
+ sync_agent_get_param_value(&(param_array[1]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &addr);
+ sync_agent_get_param_value(&(param_array[2]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &id);
+ sync_agent_get_param_value(&(param_array[3]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &password);
+ sync_agent_get_param_value(&(param_array[4]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &syncMode);
+ sync_agent_get_param_value(&(param_array[5]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &syncType);
+ sync_agent_get_param_value(&(param_array[6]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &interval);
+ sync_agent_get_param_value(&(param_array[7]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &categories);
- res = add_profile(profileDirName, profileName, addr, id, password, syncMode, syncType, interval, categories, &accountId);
+ res = add_profile(profileName, addr, id, password, syncMode, syncType, interval, categories, &accountId);
if (res == false) {
err = SYNC_AGENT_EC_TASK_ERROR_RUN_FAILED;
result = 0;
} else
result = 1;
- sync_agent_set_param_value(&(param_array[9]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &result);
- sync_agent_set_param_value(&(param_array[10]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &accountId);
+ sync_agent_set_param_value(&(param_array[8]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &result);
+ sync_agent_set_param_value(&(param_array[9]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &accountId);
/*step 2 : start refresh_from_service for added account */
void *in_param_value_array[1] = { &accountId };
@@ -630,9 +616,9 @@ sync_agent_ec_task_error_e edit_profile_task_process(unsigned int param_cnt, syn
char *addr = NULL;
char *id = NULL;
char *password = NULL;
- char *syncMode = NULL;
- char *syncType = NULL;
- char *interval = NULL;
+ int syncMode = 0;
+ int syncType = 0;
+ int interval = 0;
GList *categories = NULL;
bool res;
@@ -643,9 +629,9 @@ sync_agent_ec_task_error_e edit_profile_task_process(unsigned int param_cnt, syn
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, &syncMode);
- sync_agent_get_param_value(&(param_array[6]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &syncType);
- 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, &syncMode);
+ sync_agent_get_param_value(&(param_array[6]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &syncType);
+ 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_STRUCT, &categories);
res = edit_profile(accountId, profileName, addr, id, password, syncMode, syncType, interval, categories);
@@ -697,9 +683,9 @@ sync_agent_ec_task_error_e get_profile_data_task_process(unsigned int param_cnt,
char *addr = NULL;
char *id = NULL;
char *password = NULL;
- char *syncMode = NULL;
- char *syncType = NULL;
- char *interval = NULL;
+ int sync_mode = 0;
+ int syncType = 0;
+ int interval = 0;
int lastSessionStatus;
int lastSessionTime;
int result;
@@ -708,7 +694,7 @@ sync_agent_ec_task_error_e get_profile_data_task_process(unsigned int param_cnt,
sync_agent_get_param_value(&(param_array[0]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &accountId);
retvm_if(accountId < 0, SYNC_AGENT_EC_TASK_ERROR_RUN_FAILED, "account id = %d", accountId);
- res = get_profile_data(accountId, &profileName, &addr, &id, &password, &syncMode, &syncType, &interval, &lastSessionStatus, &lastSessionTime);
+ res = get_profile_data(accountId, &profileName, &addr, &id, &password, &sync_mode, &syncType, &interval, &lastSessionStatus, &lastSessionTime);
if (res == false) {
err = SYNC_AGENT_EC_TASK_ERROR_RUN_FAILED;
result = 0;
@@ -720,9 +706,9 @@ sync_agent_ec_task_error_e get_profile_data_task_process(unsigned int param_cnt,
sync_agent_set_param_value(&(param_array[3]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &addr);
sync_agent_set_param_value(&(param_array[4]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &id);
sync_agent_set_param_value(&(param_array[5]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &password);
- sync_agent_set_param_value(&(param_array[6]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &syncMode);
- sync_agent_set_param_value(&(param_array[7]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &syncType);
- sync_agent_set_param_value(&(param_array[8]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &interval);
+ sync_agent_set_param_value(&(param_array[6]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &sync_mode);
+ sync_agent_set_param_value(&(param_array[7]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &syncType);
+ sync_agent_set_param_value(&(param_array[8]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &interval);
sync_agent_set_param_value(&(param_array[9]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &lastSessionStatus);
sync_agent_set_param_value(&(param_array[10]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &lastSessionTime);
@@ -741,7 +727,7 @@ sync_agent_ec_task_error_e get_profile_sync_category_task_process(unsigned int p
int contentType;
int enabled = 0;
- char *srcURI = NULL;
+ int srcURI = 0;
char *tgtURI = NULL;
char *id = NULL;
char *password = NULL;
@@ -762,7 +748,7 @@ sync_agent_ec_task_error_e get_profile_sync_category_task_process(unsigned int p
sync_agent_set_param_value(&(param_array[2]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &result);
sync_agent_set_param_value(&(param_array[3]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &enabled);
- sync_agent_set_param_value(&(param_array[4]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &srcURI);
+ sync_agent_set_param_value(&(param_array[4]->param_value), SYNC_AGENT_EC_VALUE_TYPE_INT, &srcURI);
sync_agent_set_param_value(&(param_array[5]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &tgtURI);
sync_agent_set_param_value(&(param_array[6]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &id);
sync_agent_set_param_value(&(param_array[7]->param_value), SYNC_AGENT_EC_VALUE_TYPE_STRUCT, &password);