diff options
Diffstat (limited to 'src/agent/service-engine/se_storage.c')
-rwxr-xr-x | src/agent/service-engine/se_storage.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/agent/service-engine/se_storage.c b/src/agent/service-engine/se_storage.c index e204715..42efcff 100755 --- a/src/agent/service-engine/se_storage.c +++ b/src/agent/service-engine/se_storage.c @@ -193,7 +193,7 @@ static int _convert_interval_value(char* interval_str) } else if (strcmp(interval_str,DEFINE_SYNC_INTERVAL_1_MONTH_STR) == 0){ interval_value = SYNC_INTERVAL_1_MONTH; } else { - _DEBUG_ERROR("interval_str is invalid!!"); + interval_value = SYNC_INTERVAL_NONE; goto error; } @@ -421,7 +421,7 @@ se_error_type_e write_sync_resource_info(int account_id, int content_type, int l return err; } -bool get_profile_data(int account_id, char **profile_name, char **addr, char **id, char **password, int *sync_mode, int *sync_type, int *interval, int *last_session_status, int *last_session_time) +bool get_profile_data(int account_id, char **profile_dir_name, char **profile_name, char **addr, char **id, char **password, int *sync_mode, int *sync_type, int *interval, int *last_session_status, int *last_session_time) { _EXTERN_FUNC_ENTER; @@ -479,6 +479,14 @@ bool get_profile_data(int account_id, char **profile_name, char **addr, char **i if (config_data != NULL) { if (config_data->key != NULL) { + + if (strcmp(config_data->key, DEFINE_CONFIG_KEY_PROFILE_DIR_NAME) == 0) { + if (config_data->value != NULL) { + *profile_dir_name = strdup(config_data->value); + continue; + } + } + if (strcmp(config_data->key, DEFINE_CONFIG_KEY_PROFILE_NAME) == 0) { if (config_data->value != NULL) { *profile_name = strdup(config_data->value); @@ -546,7 +554,7 @@ bool get_profile_data(int account_id, char **profile_name, char **addr, char **i if (interval_str != NULL) { interval_value = _convert_interval_value(interval_str); _DEBUG_INFO("interval_value: [%d]", interval_value); - *interval = sync_type_value; + *interval = interval_value; } if (lastSessionStatus_str != NULL) @@ -1011,6 +1019,13 @@ bool get_all_profiles_data(GList ** list) if (config_data != NULL) { if (config_data->key != NULL) { + if (strcmp(config_data->key, DEFINE_CONFIG_KEY_PROFILE_ID) == 0) { + if (config_data->value != NULL) { + profile_info->profile_id = atoi(config_data->value); + continue; + } + } + if (strcmp(config_data->key, DEFINE_CONFIG_KEY_PROFILE_DIR_NAME) == 0) { if (config_data->value != NULL) { profile_info->profile_dir_name = strdup(config_data->value); |