Commit d7ec4b4a authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(parameters): Added default_suffix initializers for all parameters.

	Break overly long lines.
parent d8105df4
/* /*
* $Id: server-config.c,v 0.85 2003/07/12 21:29:48 ceder Exp $ * $Id: server-config.c,v 0.86 2003/07/12 21:43:41 ceder Exp $
* Copyright (C) 1991-1999, 2001-2002 Lysator Academic Computer Association. * Copyright (C) 1991-1999, 2001-2002 Lysator Academic Computer Association.
* *
* This file is part of the LysKOM server. * This file is part of the LysKOM server.
...@@ -80,107 +80,142 @@ static const struct parameter parameters[] = { ...@@ -80,107 +80,142 @@ static const struct parameter parameters[] = {
/* "Normal" configuration */ /* "Normal" configuration */
{"Locale", {"Locale",
assign_string, unassign_string, 0, 1, NULL, &param.use_locale}, assign_string, unassign_string, 0, 1, NULL, &param.use_locale,
NULL},
{"Force ISO 8859-1", {"Force ISO 8859-1",
assign_bool, NULL, 0, 1, "no", &param.force_iso_8859_1}, assign_bool, NULL, 0, 1, "no", &param.force_iso_8859_1,
NULL},
{"Prefix", {"Prefix",
assign_string, unassign_string, 0, 1, DEFAULT_PREFIX, &param.dbase_dir}, assign_string, unassign_string, 0, 1, DEFAULT_PREFIX,
&param.dbase_dir,
NULL},
{"Send async", {"Send async",
assign_bool, NULL, 0, 1, "1", &param.send_async_messages}, assign_bool, NULL, 0, 1, "1",
&param.send_async_messages,
NULL},
{"Client host", {"Client host",
assign_string, unassign_string, 0, 1, NULL, &param.ip_client_host}, assign_string, unassign_string, 0, 1, NULL, &param.ip_client_host,
NULL},
{"Client port", {"Client port",
assign_string, unassign_string, 1, 1, NULL, &param.ip_client_port}, assign_string, unassign_string, 1, 1, NULL, &param.ip_client_port,
NULL},
{"Presentation of conferences", {"Presentation of conferences",
assign_conf_no, NULL, 0, 1, "1", &kom_info.conf_pres_conf}, assign_conf_no, NULL, 0, 1, "1", &kom_info.conf_pres_conf,
NULL},
{"Presentation of persons", {"Presentation of persons",
assign_conf_no, NULL, 0, 1, "2", &kom_info.pers_pres_conf}, assign_conf_no, NULL, 0, 1, "2", &kom_info.pers_pres_conf,
NULL},
{"Motd-conference", {"Motd-conference",
assign_conf_no, NULL, 0, 1, "3", &kom_info.motd_conf}, assign_conf_no, NULL, 0, 1, "3", &kom_info.motd_conf,
NULL},
{"News-conference", {"News-conference",
assign_conf_no, NULL, 0, 1, "4", &kom_info.kom_news_conf}, assign_conf_no, NULL, 0, 1, "4", &kom_info.kom_news_conf,
NULL},
{"Message of the day", {"Message of the day",
assign_text_no, NULL, 0, 1, "0", &kom_info.motd_of_lyskom}, assign_text_no, NULL, 0, 1, "0", &kom_info.motd_of_lyskom,
NULL},
{"Garb", {"Garb",
assign_bool, NULL, 0, 1, "on", &param.garb_enable}, assign_bool, NULL, 0, 1, "on", &param.garb_enable,
NULL},
{"Never save", {"Never save",
assign_bool, NULL, 0, 1, "no", &param.never_save}, assign_bool, NULL, 0, 1, "no", &param.never_save,
NULL},
#ifdef LOGACCESSES #ifdef LOGACCESSES
{"Log accesses", {"Log accesses",
assign_string, unassign_string, 0, 1, NULL, assign_string, unassign_string, 0, 1, NULL,
&param.logaccess_file}, &param.logaccess_file,
NULL},
#endif #endif
/* The database files. */ /* The database files. */
{"Data file", {"Data file",
assign_string, unassign_string, 0, 1, "db/lyskomd-data", assign_string, unassign_string, 0, 1, "db/lyskomd-data",
&param.datafile_name}, &param.datafile_name,
NULL},
{"Backup file", {"Backup file",
assign_string, unassign_string, 0, 1, "db/lyskomd-backup", assign_string, unassign_string, 0, 1, "db/lyskomd-backup",
&param.backupfile_name}, &param.backupfile_name,
NULL},
{"Backup file 2", {"Backup file 2",
assign_string, unassign_string, 0, 1, "db/lyskomd-backup-prev", assign_string, unassign_string, 0, 1, "db/lyskomd-backup-prev",
&param.backupfile_name_2}, &param.backupfile_name_2,
NULL},
{"Lock file", {"Lock file",
assign_string, unassign_string, 0, 1, "db/lyskomd-lock", assign_string, unassign_string, 0, 1, "db/lyskomd-lock",
&param.lockfile_name}, &param.lockfile_name,
NULL},
{"Text file", {"Text file",
assign_string, unassign_string, 0, 1, "db/lyskomd-texts", assign_string, unassign_string, 0, 1, "db/lyskomd-texts",
&param.textfile_name}, &param.textfile_name,
NULL},
{"Number file", {"Number file",
assign_string, unassign_string, 0, 1, "db/number.txt", assign_string, unassign_string, 0, 1, "db/number.txt",
&param.numberfile_name}, &param.numberfile_name,
NULL},
{"Number temp file", {"Number temp file",
assign_string, unassign_string, 0, 1, "db/number.tmp", assign_string, unassign_string, 0, 1, "db/number.tmp",
&param.numberfile_tmp_name}, &param.numberfile_tmp_name,
NULL},
{"Text backup file", {"Text backup file",
assign_string, unassign_string, 0, 1, "db/lyskomd-texts-backup", assign_string, unassign_string, 0, 1, "db/lyskomd-texts-backup",
&param.textbackupfile_name}, &param.textbackupfile_name,
NULL},
{"Backup export directory", {"Backup export directory",
assign_string, unassign_string, 0, 1, "exportdb", assign_string, unassign_string, 0, 1, "exportdb",
&param.backup_dir}, &param.backup_dir,
NULL},
/* Various log files */ /* Various log files */
{"Log file", {"Log file",
assign_string, unassign_string, 0, 1, "etc/server-log", assign_string, unassign_string, 0, 1, "etc/server-log",
&param.logfile_name}, &param.logfile_name,
NULL},
{"Log statistics", {"Log statistics",
assign_string, unassign_string, 0, 1, "etc/lyskomd-log", assign_string, unassign_string, 0, 1, "etc/lyskomd-log",
&param.statistic_name}, &param.statistic_name,
NULL},
{"Pid file", {"Pid file",
assign_string, unassign_string, 0, 1, "etc/pid", assign_string, unassign_string, 0, 1, "etc/pid",
&param.pid_name}, &param.pid_name,
NULL},
{"Memory usage file", {"Memory usage file",
assign_string, unassign_string, 0, 1, "etc/memory-usage", assign_string, unassign_string, 0, 1, "etc/memory-usage",
&param.memuse_name}, &param.memuse_name,
NULL},
/* Other files. */ /* Other files. */
{"Aux-item definition file", {"Aux-item definition file",
assign_string, unassign_string, 0, 1, "etc/aux-items.conf", assign_string, unassign_string, 0, 1, "etc/aux-items.conf",
&param.aux_def_file}, &param.aux_def_file,
NULL},
{"Status file", {"Status file",
assign_string, unassign_string, 0, 1, "etc/status", assign_string, unassign_string, 0, 1, "etc/status",
&param.status_file}, &param.status_file,
NULL},
{"Connection status file", {"Connection status file",
assign_string, unassign_string, 0, 1, "etc/connections.txt", assign_string, unassign_string, 0, 1, "etc/connections.txt",
&param.connection_status_file}, &param.connection_status_file,
NULL},
{"Connection status temp file", {"Connection status temp file",
assign_string, unassign_string, 0, 1, "etc/connections.tmp", assign_string, unassign_string, 0, 1, "etc/connections.tmp",
&param.connection_status_file_tmp}, &param.connection_status_file_tmp,
NULL},
/* Where to dump core. */ /* Where to dump core. */
{"Core directory", {"Core directory",
assign_string, unassign_string, 0, 1, "cores", assign_string, unassign_string, 0, 1, "cores",
&param.core_dir}, &param.core_dir,
NULL},
{"Nologin file", {"Nologin file",
assign_string, unassign_string, 0, 1, "/etc/nologin", assign_string, unassign_string, 0, 1, "/etc/nologin",
&param.nologin_file}, &param.nologin_file,
NULL},
/* Performance tuning parameters (milliseconds) */ /* Performance tuning parameters (milliseconds) */
...@@ -201,7 +236,8 @@ static const struct parameter parameters[] = { ...@@ -201,7 +236,8 @@ static const struct parameter parameters[] = {
assign_timeval, NULL, 0, 1, "1440", &param.garb_interval, assign_timeval, NULL, 0, 1, "1440", &param.garb_interval,
"minutes"}, "minutes"},
{"Permissive sync", {"Permissive sync",
assign_bool, NULL, 0, 1, "off", &param.permissive_sync}, assign_bool, NULL, 0, 1, "off", &param.permissive_sync,
NULL},
{"Sync interval", {"Sync interval",
assign_timeval, NULL, 0, 1, "5", &param.sync_interval, assign_timeval, NULL, 0, 1, "5", &param.sync_interval,
"minutes"}, "minutes"},
...@@ -213,155 +249,227 @@ static const struct parameter parameters[] = { ...@@ -213,155 +249,227 @@ static const struct parameter parameters[] = {
{"Saved items per call", {"Saved items per call",
assign_int, NULL, 0, 1, "5", assign_int, NULL, 0, 1, "5",
&param.saved_items_per_call}, &param.saved_items_per_call,
NULL},
{"Penalty per call", {"Penalty per call",
assign_uint, NULL, 0, 1, "10", assign_uint, NULL, 0, 1, "10",
&param.penalty_per_call}, &param.penalty_per_call,
NULL},
{"Penalty per read", {"Penalty per read",
assign_uint, NULL, 0, 1, "1", assign_uint, NULL, 0, 1, "1",
&param.penalty_per_read}, &param.penalty_per_read,
NULL},
{"Max penalty", {"Max penalty",
assign_uint, NULL, 0, 1, "100", assign_uint, NULL, 0, 1, "100",
&param.max_penalty}, &param.max_penalty,
NULL},
{"Low penalty", {"Low penalty",
assign_uint, NULL, 0, 1, "20", assign_uint, NULL, 0, 1, "20",
&param.low_penalty}, &param.low_penalty,
NULL},
/* More performance tuning. */ /* More performance tuning. */
{"Max client transmit queue", {"Max client transmit queue",
assign_int, NULL, 0, 1, "300", &param.maxqueuedsize}, assign_int, NULL, 0, 1, "300", &param.maxqueuedsize,
NULL},
{"Max simultaneous client replies", {"Max simultaneous client replies",
assign_int, NULL, 0, 1, "10", &param.maxdequeuelen}, assign_int, NULL, 0, 1, "10", &param.maxdequeuelen,
NULL},
{"Open files", {"Open files",
assign_int, NULL, 0, 1, "-1", &param.no_files}, assign_int, NULL, 0, 1, "-1", &param.no_files,
NULL},
{"Use DNS", {"Use DNS",
assign_bool, NULL, 0, 1, "yes", &param.use_dns}, assign_bool, NULL, 0, 1, "yes", &param.use_dns,
NULL},
{"DNS log threshold", {"DNS log threshold",
assign_double, NULL, 0, 1, "1.5", assign_double, NULL, 0, 1, "1.5",
&param.dns_log_threshold}, &param.dns_log_threshold,
NULL},
/* String limits */ /* String limits */
{"Max conference name length", {"Max conference name length",
assign_int, NULL, 0, 1, "60", &param.conf_name_len}, assign_int, NULL, 0, 1, "60", &param.conf_name_len,
NULL},
{"Max client data length", {"Max client data length",
assign_int, NULL, 0, 1, "60", &param.client_data_len}, assign_int, NULL, 0, 1, "60", &param.client_data_len,
NULL},
{"Max password length", {"Max password length",
assign_int, NULL, 0, 1, "128", &param.pwd_len}, assign_int, NULL, 0, 1, "128", &param.pwd_len,
NULL},
{"Max what am I doing length", {"Max what am I doing length",
assign_int, NULL, 0, 1, "60", &param.what_do_len}, assign_int, NULL, 0, 1, "60", &param.what_do_len,
NULL},
{"Max username length", {"Max username length",
assign_int, NULL, 0, 1, "128", &param.username_len}, assign_int, NULL, 0, 1, "128", &param.username_len,
NULL},
{"Max text length", {"Max text length",
assign_int, NULL, 0, 1, "131072", &param.text_len}, assign_int, NULL, 0, 1, "131072", &param.text_len,
NULL},
{"Max aux_item length", {"Max aux_item length",
assign_int, NULL, 0, 1, "16384", &param.aux_len}, assign_int, NULL, 0, 1, "16384", &param.aux_len,
NULL},
{"Max broadcast length", {"Max broadcast length",
assign_int, NULL, 0, 1, "1024", &param.broadcast_len}, assign_int, NULL, 0, 1, "1024", &param.broadcast_len,
NULL},
{"Max regexp length", {"Max regexp length",
assign_int, NULL, 0, 1, "1024", &param.regexp_len}, assign_int, NULL, 0, 1, "1024", &param.regexp_len,
NULL},
/* Text_stat limits */ /* Text_stat limits */
{"Max marks per person", {"Max marks per person",
assign_int, NULL, 0, 1, "2048", &param.max_marks_person}, assign_int, NULL, 0, 1, "2048",
&param.max_marks_person,
NULL},
{"Max marks per text", {"Max marks per text",
assign_int, NULL, 0, 1, "1024", &param.max_marks_text}, assign_int, NULL, 0, 1, "1024", &param.max_marks_text,
NULL},
{"Max recipients per text", {"Max recipients per text",
assign_int, NULL, 0, 1, "512", &param.max_recipients}, assign_int, NULL, 0, 1, "512", &param.max_recipients,
NULL},
{"Max comments per text", {"Max comments per text",
assign_int, NULL, 0, 1, "128", &param.max_comm}, assign_int, NULL, 0, 1, "128", &param.max_comm,
NULL},
{"Max footnotes per text", {"Max footnotes per text",
assign_int, NULL, 0, 1, "32", &param.max_foot}, assign_int, NULL, 0, 1, "32", &param.max_foot,
NULL},
{"Max links per text", {"Max links per text",
assign_int, NULL, 0, 1, "512", &param.max_crea_misc}, assign_int, NULL, 0, 1, "512", &param.max_crea_misc,
NULL},
/* Other client-visible configuration */ /* Other client-visible configuration */
{"Max mark_as_read chunks", {"Max mark_as_read chunks",
assign_int, NULL, 0, 1, "128", &param.mark_as_read_chunk}, assign_int, NULL, 0, 1, "128",
&param.mark_as_read_chunk,
NULL},
{"Max accept_async len", {"Max accept_async len",
assign_int, NULL, 0, 1, "128", &param.accept_async_len}, assign_int, NULL, 0, 1, "128",
&param.accept_async_len,
NULL},
{"Max aux_items added per call", {"Max aux_items added per call",
assign_int, NULL, 0, 1, "128", &param.max_add_aux}, assign_int, NULL, 0, 1, "128", &param.max_add_aux,
NULL},
{"Max aux_items deleted per call", {"Max aux_items deleted per call",
assign_int, NULL, 0, 1, "128", &param.max_delete_aux}, assign_int, NULL, 0, 1, "128", &param.max_delete_aux,
NULL},
{"Max read_ranges per call", {"Max read_ranges per call",
assign_int, NULL, 0, 1, "512", &param.max_read_ranges}, assign_int, NULL, 0, 1, "512", &param.max_read_ranges,
NULL},
{"Max super_conf loop", {"Max super_conf loop",
assign_int, NULL, 0, 1, "17", &param.max_super_conf_loop}, assign_int, NULL, 0, 1, "17",
&param.max_super_conf_loop,
NULL},
{"Default garb nice", {"Default garb nice",
assign_int, NULL, 0, 1, "77", &param.default_nice}, assign_int, NULL, 0, 1, "77", &param.default_nice,
NULL},
{"Default keep commented nice", {"Default keep commented nice",
assign_int, NULL, 0, 1, "77", &param.default_keep_commented}, assign_int, NULL, 0, 1, "77",
&param.default_keep_commented,
NULL},
/* Security options */ /* Security options */
{"Anyone can create new persons", {"Anyone can create new persons",
assign_bool, NULL, 0, 1, "yes", &param.anyone_can_create_new_persons}, assign_bool, NULL, 0, 1, "yes",
&param.anyone_can_create_new_persons,
NULL},
{"Anyone can create new conferences", {"Anyone can create new conferences",
assign_bool, NULL, 0, 1, "yes", &param.anyone_can_create_new_confs}, assign_bool, NULL, 0, 1, "yes",
&param.anyone_can_create_new_confs,
NULL},
{"Allow creation of persons before login", {"Allow creation of persons before login",
assign_bool, NULL, 0, 1, "yes", &param.create_person_before_login}, assign_bool, NULL, 0, 1, "yes",
&param.create_person_before_login,
NULL},
{"Default change name capability", {"Default change name capability",
assign_bool, NULL, 0, 1, "on", &param.default_change_name}, assign_bool, NULL, 0, 1, "on",
&param.default_change_name,
NULL},
{"Add members by invitation", {"Add members by invitation",
assign_bool, NULL, 0, 1, "on", &param.invite_by_default}, assign_bool, NULL, 0, 1, "on",
&param.invite_by_default,
NULL},
{"Allow secret memberships", {"Allow secret memberships",
assign_bool, NULL, 0, 1, "on", &param.secret_memberships}, assign_bool, NULL, 0, 1, "on",
&param.secret_memberships,
NULL},
{"Allow reinvitations", {"Allow reinvitations",
assign_bool, NULL, 0, 1, "off", &param.allow_reinvite}, assign_bool, NULL, 0, 1, "off", &param.allow_reinvite,
NULL},
{"Log login", {"Log login",
assign_bool, NULL, 0, 1, "off", &param.log_login}, assign_bool, NULL, 0, 1, "off", &param.log_login,
NULL},
{"Ident-authentication", {"Ident-authentication",
ident_param, NULL, 0, 1, "try", &param.authentication_level}, ident_param, NULL, 0, 1, "try",
&param.authentication_level,
NULL},
/* Cache configuration */ /* Cache configuration */
{"Cache conference limit", {"Cache conference limit",
assign_int, NULL, 0, 1, "20", &param.cache_conferences}, assign_int, NULL, 0, 1, "20",
&param.cache_conferences,
NULL},
{"Cache person limit", {"Cache person limit",
assign_int, NULL, 0, 1, "20", &param.cache_persons}, assign_int, NULL, 0, 1, "20", &param.cache_persons,
NULL},
{"Cache text_stat limit", {"Cache text_stat limit",
assign_int, NULL, 0, 1, "20", &param.cache_text_stats}, assign_int, NULL, 0, 1, "20", &param.cache_text_stats,
NULL},
/* Echo the value to the log. */ /* Echo the value to the log. */
{"Echo", {"Echo",
log_param, NULL, 0, -1, NULL, NULL}, log_param, NULL, 0, -1, NULL, NULL,
NULL},
/* Register a forbidden text number. */ /* Register a forbidden text number. */
{"Jubel", {"Jubel",
jubel, NULL, 0, -1, NULL, NULL}, jubel, NULL, 0, -1, NULL, NULL,
NULL},
{"Max conferences", {"Max conferences",
assign_ulong, NULL, 1, 1, "4765", &param.max_conf}, assign_ulong, NULL, 1, 1, "4765", &param.max_conf,
NULL},
{"Max texts", {"Max texts",
assign_ulong, NULL, 1, 1, "2000000", &param.max_text}, assign_ulong, NULL, 1, 1, "2000000", &param.max_text,
NULL},
/* Configuration for support programs. */ /* Configuration for support programs. */
{"Normal shutdown time", {"Normal shutdown time",
assign_int, NULL, 0, 1, "21", &param.normal_shutdown_time}, assign_int, NULL, 0, 1, "21",
&param.normal_shutdown_time,
NULL},
{"Mail after downtime", {"Mail after downtime",
assign_int, NULL, 0, 1, "60", &param.downtime_mail_start}, assign_int, NULL, 0, 1, "60",
&param.downtime_mail_start,
NULL},
{"Mail until downtime", {"Mail until downtime",
assign_int, NULL, 0, 1, "120", &param.downtime_mail_end}, assign_int, NULL, 0, 1, "120",
&param.downtime_mail_end,
NULL},
{"lyskomd path", {"lyskomd path",
assign_string, unassign_string, 0, 1, "bin/lyskomd", &param.lyskomd_path}, assign_string, unassign_string, 0, 1, "bin/lyskomd",
&param.lyskomd_path,
NULL},
{"savecore path", {"savecore path",
assign_string, unassign_string, 0, 1, "bin/savecore", &param.savecore_path}, assign_string, unassign_string, 0, 1, "bin/savecore",
&param.savecore_path,
NULL},
/* end marker */ /* end marker */
{NULL, NULL, NULL, 0, 0, NULL, NULL}}; {NULL, NULL, NULL, 0, 0, NULL, NULL, NULL}};
/* Where to save things. These are used by lyskomd and dbck. */ /* Where to save things. These are used by lyskomd and dbck. */
......