|
|
|
@ -1497,6 +1497,7 @@ int yon_config_update_by_key(char *key){
|
|
|
|
if (current->data) free(current->data);
|
|
|
|
if (current->data) free(current->data);
|
|
|
|
current->data = NULL;
|
|
|
|
current->data = NULL;
|
|
|
|
int size=0;
|
|
|
|
int size=0;
|
|
|
|
|
|
|
|
yon_config_remove_by_key(key);
|
|
|
|
char *command = yon_config_parameter_get_load_command(key);
|
|
|
|
char *command = yon_config_parameter_get_load_command(key);
|
|
|
|
config_str new_param = yon_config_load(command,&size);
|
|
|
|
config_str new_param = yon_config_load(command,&size);
|
|
|
|
if (size&&!yon_char_is_empty(new_param[0])&&strcmp(new_param[0],"(null)\n")){
|
|
|
|
if (size&&!yon_char_is_empty(new_param[0])&&strcmp(new_param[0],"(null)\n")){
|
|
|
|
@ -1514,6 +1515,7 @@ int yon_config_update_by_list(config_str keys, size_t size){
|
|
|
|
if (!size||!keys) return 0;
|
|
|
|
if (!size||!keys) return 0;
|
|
|
|
check_config{
|
|
|
|
check_config{
|
|
|
|
int params_size=0;
|
|
|
|
int params_size=0;
|
|
|
|
|
|
|
|
yon_config_remove_by_list(keys,size);
|
|
|
|
config_str parameters = yon_config_get_load_parameters_by_list(¶ms_size,keys,size);
|
|
|
|
config_str parameters = yon_config_get_load_parameters_by_list(¶ms_size,keys,size);
|
|
|
|
if (params_size&¶meters){
|
|
|
|
if (params_size&¶meters){
|
|
|
|
char *path = yon_config_command_get_path(config_last_load_command);
|
|
|
|
char *path = yon_config_command_get_path(config_last_load_command);
|
|
|
|
@ -1531,12 +1533,12 @@ int yon_config_update_by_args(char *key, ...){
|
|
|
|
config_str keys = NULL;
|
|
|
|
config_str keys = NULL;
|
|
|
|
yon_char_parsed_add_or_create_if_exists(keys,&size,key);
|
|
|
|
yon_char_parsed_add_or_create_if_exists(keys,&size,key);
|
|
|
|
va_list args;
|
|
|
|
va_list args;
|
|
|
|
yon_config_clear_by_key(key);
|
|
|
|
yon_config_remove_by_key(key);
|
|
|
|
va_start(args,key);
|
|
|
|
va_start(args,key);
|
|
|
|
char *cur_key = NULL;
|
|
|
|
char *cur_key = NULL;
|
|
|
|
while((cur_key = va_arg(args,char*))){
|
|
|
|
while((cur_key = va_arg(args,char*))){
|
|
|
|
yon_char_parsed_add_or_create_if_exists(keys,&size,cur_key);
|
|
|
|
yon_char_parsed_add_or_create_if_exists(keys,&size,cur_key);
|
|
|
|
yon_config_clear_by_key(cur_key);
|
|
|
|
yon_config_remove_by_key(cur_key);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
int params_size=0;
|
|
|
|
int params_size=0;
|
|
|
|
|