Commit 7655486c authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(main): Use get_default_config_file_name() to find the config file.

	Don't set read_config_file -- nothing used the value.
parent 3c9a4850
/*
* $Id: ramkomd.c,v 0.126 2003/08/12 13:14:14 ceder Exp $
* $Id: ramkomd.c,v 0.127 2003/08/15 19:46:14 ceder Exp $
* Copyright (C) 1991-1999, 2001-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -568,8 +568,7 @@ main (int argc,
char **argv)
{
int i;
char *default_config_file;
char *config_file;
const char *config_file;
oop_source *src;
link_ansi();
......@@ -628,13 +627,10 @@ main (int argc,
/* Read in the configuration file. */
default_config_file = smalloc(strlen(DEFAULT_DBASE_DIR) +
strlen(CONFIG_FILE) + 2);
sprintf(default_config_file, "%s/%s", DEFAULT_DBASE_DIR, CONFIG_FILE);
if (i < argc)
config_file = argv[i++];
else
config_file = default_config_file;
config_file = get_default_config_file_name();
if (i < argc)
restart_kom("usage: %s [-d ...] [config-file]\n", argv[0]);
......@@ -643,10 +639,6 @@ main (int argc,
initialize(config_file); /* Read config, listen, and start db */
chdir(param.core_dir);
read_config_file = smalloc(strlen(config_file) + 1);
strcpy(read_config_file, config_file);
sfree(default_config_file);
save_pid();
check_all_stats("init");
......@@ -712,7 +704,7 @@ dump_exit_statistics(void)
free_kom_info();
free_aux_item_definitions();
free_configuration();
sfree(read_config_file);
free_default_config_file_name();
dump_smalloc_counts(stat_file);
dump_alloc_counts(stat_file);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment