Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
7655486c
Commit
7655486c
authored
Aug 15, 2003
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server/ramkomd.c
View file @
7655486c
/*
* $Id: ramkomd.c,v 0.12
6
2003/08/1
2
1
3:14
:14 ceder Exp $
* $Id: ramkomd.c,v 0.12
7
2003/08/1
5
1
9: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
();
s
free
(
read
_config_file
);
free
_default
_config_file
_name
(
);
dump_smalloc_counts
(
stat_file
);
dump_alloc_counts
(
stat_file
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment