| version 1.16, 2002/02/28 17:50:38 |
version 1.17, 2002/04/08 21:26:08 |
| Line 179 conf_parse_all(argc, argv) |
|
| Line 179 conf_parse_all(argc, argv) |
|
| || (i == 1 && ! global->disable_user_config)) |
|| (i == 1 && ! global->disable_user_config)) |
| continue; |
continue; |
| |
|
| filename = i <= 0 ? conf_global_filename : i == 1 |
filename = i <= 0 ? conf_global_filename |
| ? get_user_config_filename() : global->config_file[i - 2]; |
: i == 1 ? get_user_config_filename() |
| |
: global->config_file[i - 2]; |
| |
|
| if (/* i == 1 && */ filename == NULL) { |
if (/* i == 1 && */ filename == NULL) { |
| msg_error_print("not enough memory\n"); |
msg_error_print("not enough memory\n"); |
| /* TODO: free structures */ |
/* TODO: free structures */ |
| |
free(start_idx); |
| return NULL; |
return NULL; |
| } |
} |
| |
|
| Line 201 conf_parse_all(argc, argv) |
|
| Line 203 conf_parse_all(argc, argv) |
|
| || (i < 2 && ret != CFG_ERR_FILE_NOT_FOUND))) { |
|| (i < 2 && ret != CFG_ERR_FILE_NOT_FOUND))) { |
| msg_error_print("config file '%s' parsing error %d\n", |
msg_error_print("config file '%s' parsing error %d\n", |
| filename, ret); |
filename, ret); |
| /* TODO: free structures */ |
free(start_idx); |
| |
if (i == 1) |
| |
free(filename); |
| return NULL; |
return NULL; |
| } |
} |
| |
|
| Line 214 conf_parse_all(argc, argv) |
|
| Line 218 conf_parse_all(argc, argv) |
|
| if (! add_processes_to_processes(&processes, processes_work)) { |
if (! add_processes_to_processes(&processes, processes_work)) { |
| msg_error_print("not enough memory for config file '%s'" |
msg_error_print("not enough memory for config file '%s'" |
| "process table merging\n", filename); |
"process table merging\n", filename); |
| /* TODO: free structures */ |
if (i == 1) |
| |
free(start_idx); |
| |
free(filename); |
| return NULL; |
return NULL; |
| } |
} |
| |
|
| Line 260 conf_parse_all(argc, argv) |
|
| Line 266 conf_parse_all(argc, argv) |
|
| } |
} |
| #endif |
#endif |
| |
|
| |
/* |
| |
* Here are proccesses going to be added into new PROCTABLE. |
| |
*/ |
| |
|
| if ((ptbl = proctable_create(0)) == NULL || |
if ((ptbl = proctable_create(0)) == NULL || |
| proctable_add_std_process(&ptbl) < 0) { |
proctable_add_std_process(&ptbl) < 0) { |
| msg_error_print("not enough memory\n"); |
msg_error_print("not enough memory\n"); |
| /* TODO: free structures */ |
/* TODO: free structures */ |
| |
free(start_idx); |
| return NULL; |
return NULL; |
| } |
} |
| |
|
| /* TODO: error check */ |
/* TODO: error check */ |
| add_processes_to_proctable(&ptbl, processes, start_idx_size, start_idx); |
if (add_processes_to_proctable(&ptbl, processes, |
| |
start_idx_size, start_idx) < 0) { |
| |
/* TODO: free structures */ |
| |
free(start_idx); |
| |
return NULL; |
| |
} |
| |
|
| free(start_idx); |
free(start_idx); |
| |
|
| Line 346 conf_cfgfile_parse(filename, global, pro |
|
| Line 362 conf_cfgfile_parse(filename, global, pro |
|
| } |
} |
| |
|
| /* Set returning parameters. */ |
/* Set returning parameters. */ |
| if ((cur_context == process_context && |
if (cur_context == process_context && |
| ! add_process_cfg_to_processes(processes, &processes_size)) |
! add_process_cfg_to_processes(processes, &processes_size)) |
| || ! add_global_cfg_to_global(global)) |
return CFG_ERR_NOMEM; |
| |
|
| |
if (! add_global_cfg_to_global(global)) |
| return CFG_ERR_NOMEM; |
return CFG_ERR_NOMEM; |
| |
|
| return ret; |
return ret; |
| Line 425 conf_cmdline_parse(argc, argv, global, p |
|
| Line 443 conf_cmdline_parse(argc, argv, global, p |
|
| } |
} |
| |
|
| /* Set returning parameters. */ |
/* Set returning parameters. */ |
| if ((cur_context == process_context && ret == CFG_OK |
if (cur_context == process_context |
| && cfg_get_cur_idx(cur_context) > 0 && |
&& ret == CFG_OK |
| ! add_process_cfg_to_processes(processes, &processes_size)) |
&& cfg_get_cur_idx(cur_context) > 0 |
| || ! add_global_cfg_to_global(global)) |
&& ! add_process_cfg_to_processes(processes, &processes_size)) |
| |
return CFG_ERR_NOMEM; |
| |
|
| |
if (! add_global_cfg_to_global(global)) |
| return CFG_ERR_NOMEM; |
return CFG_ERR_NOMEM; |
| |
|
| return ret; |
return ret; |