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.
*
* This file is part of the LysKOM server.
......@@ -80,107 +80,142 @@ static const struct parameter parameters[] = {
/* "Normal" configuration */
{"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",
assign_bool, NULL, 0, 1, "no", &param.force_iso_8859_1},
assign_bool, NULL, 0, 1, "no", &param.force_iso_8859_1,
NULL},
{"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",
assign_bool, NULL, 0, 1, "1", &param.send_async_messages},
assign_bool, NULL, 0, 1, "1",
&param.send_async_messages,
NULL},
{"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",
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",
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",
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",
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",
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",
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",
assign_bool, NULL, 0, 1, "on", &param.garb_enable},
assign_bool, NULL, 0, 1, "on", &param.garb_enable,
NULL},
{"Never save",
assign_bool, NULL, 0, 1, "no", &param.never_save},
assign_bool, NULL, 0, 1, "no", &param.never_save,
NULL},
#ifdef LOGACCESSES
{"Log accesses",
assign_string, unassign_string, 0, 1, NULL,
&param.logaccess_file},
&param.logaccess_file,
NULL},
#endif
/* The database files. */
{"Data file",
assign_string, unassign_string, 0, 1, "db/lyskomd-data",
&param.datafile_name},
&param.datafile_name,
NULL},
{"Backup file",
assign_string, unassign_string, 0, 1, "db/lyskomd-backup",
&param.backupfile_name},
&param.backupfile_name,
NULL},
{"Backup file 2",
assign_string, unassign_string, 0, 1, "db/lyskomd-backup-prev",
&param.backupfile_name_2},
&param.backupfile_name_2,
NULL},
{"Lock file",
assign_string, unassign_string, 0, 1, "db/lyskomd-lock",
&param.lockfile_name},
&param.lockfile_name,
NULL},
{"Text file",
assign_string, unassign_string, 0, 1, "db/lyskomd-texts",
&param.textfile_name},
&param.textfile_name,
NULL},
{"Number file",
assign_string, unassign_string, 0, 1, "db/number.txt",
&param.numberfile_name},
&param.numberfile_name,
NULL},
{"Number temp file",
assign_string, unassign_string, 0, 1, "db/number.tmp",
&param.numberfile_tmp_name},
&param.numberfile_tmp_name,
NULL},
{"Text backup file",
assign_string, unassign_string, 0, 1, "db/lyskomd-texts-backup",
&param.textbackupfile_name},
&param.textbackupfile_name,
NULL},
{"Backup export directory",
assign_string, unassign_string, 0, 1, "exportdb",
&param.backup_dir},
&param.backup_dir,
NULL},
/* Various log files */
{"Log file",
assign_string, unassign_string, 0, 1, "etc/server-log",
&param.logfile_name},
&param.logfile_name,
NULL},
{"Log statistics",
assign_string, unassign_string, 0, 1, "etc/lyskomd-log",
&param.statistic_name},
&param.statistic_name,
NULL},
{"Pid file",
assign_string, unassign_string, 0, 1, "etc/pid",
&param.pid_name},
&param.pid_name,
NULL},
{"Memory usage file",
assign_string, unassign_string, 0, 1, "etc/memory-usage",
&param.memuse_name},
&param.memuse_name,
NULL},
/* Other files. */
{"Aux-item definition file",
assign_string, unassign_string, 0, 1, "etc/aux-items.conf",
&param.aux_def_file},
&param.aux_def_file,
NULL},
{"Status file",
assign_string, unassign_string, 0, 1, "etc/status",
&param.status_file},
&param.status_file,
NULL},
{"Connection status file",
assign_string, unassign_string, 0, 1, "etc/connections.txt",
&param.connection_status_file},
&param.connection_status_file,
NULL},
{"Connection status temp file",
assign_string, unassign_string, 0, 1, "etc/connections.tmp",
&param.connection_status_file_tmp},
&param.connection_status_file_tmp,
NULL},
/* Where to dump core. */
{"Core directory",
assign_string, unassign_string, 0, 1, "cores",
&param.core_dir},
&param.core_dir,
NULL},
{"Nologin file",
assign_string, unassign_string, 0, 1, "/etc/nologin",
&param.nologin_file},
&param.nologin_file,
NULL},
/* Performance tuning parameters (milliseconds) */
......@@ -201,7 +236,8 @@ static const struct parameter parameters[] = {
assign_timeval, NULL, 0, 1, "1440", &param.garb_interval,
"minutes"},
{"Permissive sync",
assign_bool, NULL, 0, 1, "off", &param.permissive_sync},
assign_bool, NULL, 0, 1, "off", &param.permissive_sync,
NULL},
{"Sync interval",
assign_timeval, NULL, 0, 1, "5", &param.sync_interval,
"minutes"},
......@@ -213,155 +249,227 @@ static const struct parameter parameters[] = {
{"Saved items per call",
assign_int, NULL, 0, 1, "5",
&param.saved_items_per_call},
&param.saved_items_per_call,
NULL},
{"Penalty per call",
assign_uint, NULL, 0, 1, "10",
&param.penalty_per_call},
&param.penalty_per_call,
NULL},
{"Penalty per read",
assign_uint, NULL, 0, 1, "1",
&param.penalty_per_read},
&param.penalty_per_read,
NULL},
{"Max penalty",
assign_uint, NULL, 0, 1, "100",
&param.max_penalty},
&param.max_penalty,
NULL},
{"Low penalty",
assign_uint, NULL, 0, 1, "20",
&param.low_penalty},
&param.low_penalty,
NULL},
/* More performance tuning. */
{"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",
assign_int, NULL, 0, 1, "10", &param.maxdequeuelen},
assign_int, NULL, 0, 1, "10", &param.maxdequeuelen,
NULL},
{"Open files",
assign_int, NULL, 0, 1, "-1", &param.no_files},
assign_int, NULL, 0, 1, "-1", &param.no_files,
NULL},
{"Use DNS",
assign_bool, NULL, 0, 1, "yes", &param.use_dns},
assign_bool, NULL, 0, 1, "yes", &param.use_dns,
NULL},
{"DNS log threshold",
assign_double, NULL, 0, 1, "1.5",
&param.dns_log_threshold},
&param.dns_log_threshold,
NULL},
/* String limits */
{"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",
assign_int, NULL, 0, 1, "60", &param.client_data_len},
assign_int, NULL, 0, 1, "60", &param.client_data_len,
NULL},
{"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",
assign_int, NULL, 0, 1, "60", &param.what_do_len},
assign_int, NULL, 0, 1, "60", &param.what_do_len,
NULL},
{"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",
assign_int, NULL, 0, 1, "131072", &param.text_len},
assign_int, NULL, 0, 1, "131072", &param.text_len,
NULL},
{"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",
assign_int, NULL, 0, 1, "1024", &param.broadcast_len},
assign_int, NULL, 0, 1, "1024", &param.broadcast_len,
NULL},
{"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 */
{"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",
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",
assign_int, NULL, 0, 1, "512", &param.max_recipients},
assign_int, NULL, 0, 1, "512", &param.max_recipients,
NULL},
{"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",
assign_int, NULL, 0, 1, "32", &param.max_foot},
assign_int, NULL, 0, 1, "32", &param.max_foot,
NULL},
{"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 */
{"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",
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",
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",
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",
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",
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",
assign_int, NULL, 0, 1, "77", &param.default_nice},
assign_int, NULL, 0, 1, "77", &param.default_nice,
NULL},
{"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 */
{"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",
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",
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",
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",
assign_bool, NULL, 0, 1, "on", &param.invite_by_default},
assign_bool, NULL, 0, 1, "on",
&param.invite_by_default,
NULL},
{"Allow secret memberships",
assign_bool, NULL, 0, 1, "on", &param.secret_memberships},
assign_bool, NULL, 0, 1, "on",
&param.secret_memberships,
NULL},
{"Allow reinvitations",
assign_bool, NULL, 0, 1, "off", &param.allow_reinvite},
assign_bool, NULL, 0, 1, "off", &param.allow_reinvite,
NULL},
{"Log login",
assign_bool, NULL, 0, 1, "off", &param.log_login},
assign_bool, NULL, 0, 1, "off", &param.log_login,
NULL},
{"Ident-authentication",
ident_param, NULL, 0, 1, "try", &param.authentication_level},
ident_param, NULL, 0, 1, "try",
&param.authentication_level,
NULL},
/* Cache configuration */
{"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",
assign_int, NULL, 0, 1, "20", &param.cache_persons},
assign_int, NULL, 0, 1, "20", &param.cache_persons,
NULL},
{"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",
log_param, NULL, 0, -1, NULL, NULL},
log_param, NULL, 0, -1, NULL, NULL,
NULL},
/* Register a forbidden text number. */
{"Jubel",
jubel, NULL, 0, -1, NULL, NULL},
jubel, NULL, 0, -1, NULL, NULL,
NULL},
{"Max conferences",
assign_ulong, NULL, 1, 1, "4765", &param.max_conf},
assign_ulong, NULL, 1, 1, "4765", &param.max_conf,
NULL},
{"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. */
{"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",
assign_int, NULL, 0, 1, "60", &param.downtime_mail_start},
assign_int, NULL, 0, 1, "60",
&param.downtime_mail_start,
NULL},
{"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",
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",
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 */
{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. */
......
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