server-config.c 3.18 KB
Newer Older
Per Cederqvist's avatar
Per Cederqvist committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/*
 *  config.c
 *
 *  This is in a .c file to make it possible to change a value without having
 *  to recompile the entire server.
 */


/* Where to save things. These are used by ramkomd. */

const char * DEFAULT_DBASE_DIR = "/usr/lyskom";

const char *DATAFILE_NAME   = "db/ramkomd-data";
const char *BACKUPFILE_NAME = "db/ramkomd-backup";
const char *TEXTFILE_NAME   = "db/ramkomd-texts";
const char *STATISTIC_NAME  = "etc/ramkomd-logg";
const char *PID_NAME   = "etc/pid";

/* Communications */

const char * DEFAULT_CLIENT_SERVICE = "lyskom-client";  /* Can be number! */
const char * DEFAULT_MUX_SERVICE    = "lyskom-mux";     /* Can be number! */

#if 0
const int IN_CLIENT_PORT = 4896;	/* Which port does LysKOM listen to? */
const int IN_MUX_PORT = 4895;		/* Which port does LysKOM listen to? */
#endif

/*
 * The following should always be true:
 * 0 <= SYNCTIMEOUT <= GARBTIMEOUT <= TIMEOUT
 * Times in milliseconds.
 *
 * GARBTIMEOUT and SYNCTIMEOUT are only used in diskomd.
 */
const int TIMEOUT = 100;	/* Timeout to select() when totally idle.
				 * Should be much larger. Is this small
				 to work around the famous select bug
				 in isc. */
const int GARBTIMEOUT = 100;	/* Timeout to select() when garbing texts
				   but not syncing. */
const int SYNCTIMEOUT = 10;	/* Timeout to select() when syncing. */

/* Times in minutes. */
const int GARB_INTERVAL = 60*24; /* Once a day. */
const int SYNC_INTERVAL = 30;	/* 30 = Twice per hour. */
const int SYNC_RETRY_INTERVAL = 5; /* 5 = Wait 5 minutes and retry after
				      an error. */

/* String limits */

const int CONF_NAME_LEN = 60;	/* Conference (and Person) name */
const int PWD_LEN	= 128;	/* Password. It is not guaranteed that all
				   chars are significant. */
const int WHAT_DO_LEN	=  60;	/* what_am_i_doing */
const int USERNAME_LEN	= 128;	/* Max login-id from clients */
const int TEXT_LEN      =131072;/* Max len of a text. */
const int BROADCAST_LEN = 1024;	/* Max len of a broadcast message */

/* Text_stat limits */

const int MAX_MARKS_PERSON = 2048; /* Max marks per person */
const int MAX_MARKS_TEXT   = 1024; /* Max marks per text */
const int MAX_RECIPIENTS   =  256; /* Max recipients/cc_recipients per text */
const int MAX_COMM	   =  128; /* Max number of comments to a text */
const int MAX_FOOT	   =   32; /* Max number of footnotes to a text */
const int MAX_CREA_MISC    =  512; /* Sum of recipients, cc_recipients, comm_to
				   * and footn_to must not exceed MAX_CREA_MISC
				    * when the text is created. */

/*
 * Some other limits
 */

#ifdef __sequent__
const int MAX_NO_OF_CONNECTIONS = 12;
#else
const int MAX_NO_OF_CONNECTIONS = 32;	/* the maximum number of persons
					 * that can use Kom simultaneously */
#endif

const int MARK_AS_READ_CHUNK    = 128;	/* You can't mark more than this many
					 * texts as read in one call. */

/*
 * Max number of nested super_confs a message will be forwarded before
 * the server gives up.
 */
const int MAX_SUPER_CONF_LOOP = 17;


const int DEFAULT_NICE = 77;	/* Number of days a text normally lives. */



/* Max entries in the per-client transmit queue */
const int MAXQUEUEDSIZE = 300;

/* Max entries in the per-client transmit queue to send at any one time */
const int MAXDEQUEUELEN = 10;