Commit 4f6089d8 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Fixed bugs introduced in rev 0.44.

parent c15f950b
/*
* $Id: ramkomd.c,v 0.44 1994/01/12 01:44:21 ceder Exp $
* $Id: ramkomd.c,v 0.45 1994/01/12 04:08:51 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -31,7 +31,7 @@
* It has grown! /ceder
*/
static char *rcsid = "$Id: ramkomd.c,v 0.44 1994/01/12 01:44:21 ceder Exp $";
static char *rcsid = "$Id: ramkomd.c,v 0.45 1994/01/12 04:08:51 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -89,21 +89,22 @@ struct kom_par param;
Kom_err kom_errno = KOM_NO_ERROR;
unsigned long err_stat = 0;
static Bool false = FALSE;
static Bool true = TRUE;
static Conf_no c1 = 1;
static Conf_no c2 = 2;
static Conf_no c3 = 3;
static Conf_no c4 = 4;
static Text_no t0 = 0;
static Success log_param(const char *val, const struct parameter *par);
static const struct parameter parameters[] = {
/* "Normal" configuration */
{"Locale",
assign_string, 0, 1, NULL, &param.use_locale},
{"Database directory",
{"Prefix",
assign_string, 0, 1, NULL, &param.dbase_dir},
{"Send async",
assign_bool, 0, 1, &true, &param.send_async_messages},
assign_bool, 0, 1, "1", &param.send_async_messages},
{"Client port",
assign_string, 1, 1, NULL, &param.ip_client_port},
{"Mux port",
......@@ -120,12 +121,16 @@ static const struct parameter parameters[] = {
assign_text_no, 0, 1, &t0, &kom_info.motd_of_lyskom},
#ifdef DEBUG
{"Never save",
assign_bool, 0, 1, &false, &param.never_save},
assign_bool, 0, 1, "0", &param.never_save},
#endif
#ifdef LOGACCESSES
{"Log accesses",
assign_string, 0, 1, NULL, &param.logaccess_file},
#endif
/* Echo the value to the log. */
{"Echo",
log_param, 0, -1, NULL, NULL},
{NULL, NULL, NULL, FALSE, NULL}}; /* end marker */
#ifdef DEBUG
......@@ -144,6 +149,14 @@ static IscSession *listen_mux = NULL; /* -"- */
static void dump_exit_statistics(void);
static Success
log_param(const char *val, const struct parameter *par)
{
if (val != NULL)
log ("config: %s\n", val);
return OK;
}
static void
server_init (char * client_port, char * mux_port)
{
......@@ -383,8 +396,8 @@ main (int argc,
/* Read in the configuration file. */
default_config_file = smalloc(sizeof(DEFAULT_DBASE_DIR) +
sizeof(CONFIG_FILE) + 2);
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++];
......
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