ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/ircd.c
Revision: 4162
Committed: Thu Jul 3 19:39:31 2014 UTC (11 years, 1 month ago) by michael
Content type: text/x-csrc
File size: 17084 byte(s)
Log Message:
- Removed ssl_server_method and ssl_client_method configuration options.
  ircd now only allows TLSv1, TLSv1.1 and TLSv1.2 protocols depending
  on the OpenSSL version.

File Contents

# User Rev Content
1 adx 30 /*
2 michael 2916 * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3 adx 30 *
4 michael 2916 * Copyright (c) 1997-2014 ircd-hybrid development team
5 adx 30 *
6     * This program is free software; you can redistribute it and/or modify
7     * it under the terms of the GNU General Public License as published by
8     * the Free Software Foundation; either version 2 of the License, or
9     * (at your option) any later version.
10     *
11     * This program is distributed in the hope that it will be useful,
12     * but WITHOUT ANY WARRANTY; without even the implied warranty of
13     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14     * GNU General Public License for more details.
15     *
16     * You should have received a copy of the GNU General Public License
17     * along with this program; if not, write to the Free Software
18     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19     * USA
20     */
21    
22 michael 2916 /*! \file ircd.c
23     * \brief Starts up and runs the ircd.
24     * \version $Id$
25     */
26    
27 adx 30 #include "stdinc.h"
28 michael 3347 #include "user.h"
29 michael 1011 #include "list.h"
30 adx 30 #include "ircd.h"
31     #include "channel.h"
32     #include "client.h"
33     #include "event.h"
34     #include "fdlist.h"
35     #include "hash.h"
36     #include "irc_string.h"
37     #include "ircd_signal.h"
38 michael 3321 #include "gline.h"
39 adx 30 #include "motd.h"
40 michael 1632 #include "conf.h"
41 adx 30 #include "hostmask.h"
42     #include "parse.h"
43 michael 3322 #include "res.h"
44 adx 30 #include "restart.h"
45 michael 982 #include "rng_mt.h"
46 michael 3324 #include "auth.h"
47 adx 30 #include "s_bsd.h"
48 michael 1309 #include "log.h"
49 michael 3347 #include "server.h" /* try_connections */
50 adx 30 #include "send.h"
51     #include "whowas.h"
52     #include "modules.h"
53     #include "memory.h"
54 michael 1654 #include "mempool.h"
55 adx 30 #include "ircd_getopt.h"
56 michael 876 #include "watch.h"
57 michael 1622 #include "conf_db.h"
58 michael 1632 #include "conf_class.h"
59 adx 30
60 michael 1858
61     #ifdef HAVE_LIBGEOIP
62     GeoIP *geoip_ctx;
63     #endif
64 michael 2872
65 michael 896 struct ServerStatistics ServerStats;
66 adx 30 struct timeval SystemTime;
67     struct Client me; /* That's me */
68     struct LocalUser meLocalUser; /* That's also part of me */
69    
70     const char *logFileName = LPATH;
71     const char *pidFileName = PPATH;
72    
73     char **myargv;
74    
75     int dorehash = 0;
76     int doremotd = 0;
77    
78     /* Set to zero because it should be initialized later using
79     * initialize_server_capabs
80     */
81 michael 3907 unsigned int default_server_capabs;
82 michael 1013 unsigned int splitmode;
83     unsigned int splitchecking;
84     unsigned int split_users;
85 adx 30 unsigned int split_servers;
86    
87 michael 4094 static struct event event_cleanup_glines =
88     {
89     .name = "cleanup_glines",
90     .handler = cleanup_glines,
91     .when = CLEANUP_GLINES_TIME
92     };
93    
94     static struct event event_cleanup_tklines =
95     {
96     .name = "cleanup_tklines",
97     .handler = cleanup_tklines,
98     .when = CLEANUP_TKLINES_TIME
99     };
100    
101     static struct event event_try_connections =
102     {
103     .name = "try_connections",
104     .handler = try_connections,
105     .when = STARTUP_CONNECTIONS_TIME
106     };
107    
108     static struct event event_comm_checktimeouts =
109     {
110     .name = "comm_checktimeouts",
111     .handler = comm_checktimeouts,
112     .when = 1
113     };
114    
115     static struct event event_save_all_databases =
116     {
117     .name = "save_all_databases",
118     .handler = save_all_databases,
119     .when = DATABASE_UPDATE_TIMEOUT
120     };
121    
122     struct event event_write_links_file =
123     {
124     .name = "write_links_file",
125     .handler = write_links_file,
126     };
127    
128    
129 adx 30 /*
130     * print_startup - print startup information
131     */
132     static void
133     print_startup(int pid)
134     {
135 michael 2646 printf("ircd: version %s(%s)\n", ircd_version, serno);
136 adx 30 printf("ircd: pid %d\n", pid);
137     printf("ircd: running in %s mode from %s\n", !server_state.foreground ? "background"
138     : "foreground", ConfigFileEntry.dpath);
139     }
140    
141     static void
142     make_daemon(void)
143     {
144     int pid;
145    
146     if ((pid = fork()) < 0)
147     {
148     perror("fork");
149     exit(EXIT_FAILURE);
150     }
151     else if (pid > 0)
152     {
153     print_startup(pid);
154     exit(EXIT_SUCCESS);
155     }
156    
157     setsid();
158     }
159    
160     static int printVersion = 0;
161    
162 michael 3215 static struct lgetopt myopts[] =
163     {
164 michael 2916 {"configfile", &ConfigFileEntry.configfile,
165 adx 30 STRING, "File to use for ircd.conf"},
166 michael 1718 {"glinefile", &ConfigFileEntry.glinefile,
167     STRING, "File to use for gline database"},
168 michael 2916 {"klinefile", &ConfigFileEntry.klinefile,
169 michael 1718 STRING, "File to use for kline database"},
170     {"dlinefile", &ConfigFileEntry.dlinefile,
171     STRING, "File to use for dline database"},
172 michael 2916 {"xlinefile", &ConfigFileEntry.xlinefile,
173 michael 1718 STRING, "File to use for xline database"},
174     {"resvfile", &ConfigFileEntry.resvfile,
175     STRING, "File to use for resv database"},
176 michael 2916 {"logfile", &logFileName,
177 adx 30 STRING, "File to use for ircd.log"},
178     {"pidfile", &pidFileName,
179     STRING, "File to use for process ID"},
180 michael 2916 {"foreground", &server_state.foreground,
181 adx 30 YESNO, "Run in foreground (don't detach)"},
182 michael 2916 {"version", &printVersion,
183 adx 30 YESNO, "Print version and exit"},
184     {"help", NULL, USAGE, "Print this text"},
185     {NULL, NULL, STRING, NULL},
186     };
187    
188     void
189     set_time(void)
190     {
191 michael 2978 struct timeval newtime = { .tv_sec = 0, .tv_usec = 0 };
192 adx 30
193     if (gettimeofday(&newtime, NULL) == -1)
194     {
195 michael 1247 ilog(LOG_TYPE_IRCD, "Clock Failure (%s), TS can be corrupted",
196 adx 30 strerror(errno));
197 michael 1618 sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
198 adx 30 "Clock Failure (%s), TS can be corrupted",
199     strerror(errno));
200 michael 3167 server_die("Clock Failure", 1);
201 adx 30 }
202    
203     if (newtime.tv_sec < CurrentTime)
204     {
205 michael 2980 ilog(LOG_TYPE_IRCD, "System clock is running backwards - (%lu < %lu)",
206     (unsigned long)newtime.tv_sec, (unsigned long)CurrentTime);
207     sendto_realops_flags(UMODE_DEBUG, L_ALL, SEND_NOTICE,
208     "System clock is running backwards - (%lu < %lu)",
209     (unsigned long)newtime.tv_sec,
210     (unsigned long)CurrentTime);
211 adx 30 set_back_events(CurrentTime - newtime.tv_sec);
212     }
213    
214     SystemTime.tv_sec = newtime.tv_sec;
215     SystemTime.tv_usec = newtime.tv_usec;
216     }
217    
218     static void
219     io_loop(void)
220     {
221 michael 3215 while (1)
222 adx 30 {
223     if (listing_client_list.head)
224     {
225     dlink_node *ptr = NULL, *ptr_next = NULL;
226     DLINK_FOREACH_SAFE(ptr, ptr_next, listing_client_list.head)
227 michael 3288 safe_list_channels(ptr->data, 0);
228 adx 30 }
229    
230 michael 4094 /* Run pending events */
231     event_run();
232 adx 30
233     comm_select();
234     exit_aborted_clients();
235     free_exited_clients();
236    
237     /* Check to see whether we have to rehash the configuration .. */
238     if (dorehash)
239     {
240     rehash(1);
241     dorehash = 0;
242     }
243 michael 3215
244 adx 30 if (doremotd)
245     {
246 michael 2150 motd_recache();
247 michael 1618 sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
248 michael 3065 "Got signal SIGUSR1, reloading motd file(s)");
249 adx 30 doremotd = 0;
250     }
251     }
252     }
253    
254     /* initalialize_global_set_options()
255     *
256     * inputs - none
257     * output - none
258 michael 2916 * side effects - This sets all global set options needed
259 adx 30 */
260     static void
261     initialize_global_set_options(void)
262     {
263     memset(&GlobalSetOptions, 0, sizeof(GlobalSetOptions));
264    
265     GlobalSetOptions.autoconn = 1;
266     GlobalSetOptions.spam_time = MIN_JOIN_LEAVE_TIME;
267     GlobalSetOptions.spam_num = MAX_JOIN_LEAVE_COUNT;
268    
269     if (ConfigFileEntry.default_floodcount)
270     GlobalSetOptions.floodcount = ConfigFileEntry.default_floodcount;
271     else
272     GlobalSetOptions.floodcount = 10;
273    
274     /* XXX I have no idea what to try here - Dianora */
275     GlobalSetOptions.joinfloodcount = 16;
276     GlobalSetOptions.joinfloodtime = 8;
277    
278     split_servers = ConfigChannel.default_split_server_count;
279     split_users = ConfigChannel.default_split_user_count;
280    
281     if (split_users && split_servers && (ConfigChannel.no_create_on_split ||
282     ConfigChannel.no_join_on_split))
283     {
284     splitmode = 1;
285     splitchecking = 1;
286     }
287    
288     GlobalSetOptions.ident_timeout = IDENT_TIMEOUT;
289     /* End of global set options */
290     }
291    
292     /* initialize_server_capabs()
293     *
294     * inputs - none
295     * output - none
296     */
297     static void
298     initialize_server_capabs(void)
299     {
300     add_capability("QS", CAP_QS, 1);
301     add_capability("EOB", CAP_EOB, 1);
302 michael 1117 add_capability("TS6", CAP_TS6, 0);
303 adx 30 add_capability("CLUSTER", CAP_CLUSTER, 1);
304 michael 1196 add_capability("SVS", CAP_SVS, 1);
305 michael 3267 add_capability("CHW", CAP_CHW, 1);
306 adx 30 add_capability("HOPS", CAP_HOPS, 1);
307     }
308    
309     /* write_pidfile()
310     *
311     * inputs - filename+path of pid file
312     * output - NONE
313     * side effects - write the pid of the ircd to filename
314     */
315     static void
316     write_pidfile(const char *filename)
317     {
318 michael 1325 FILE *fb;
319 adx 30
320 michael 1325 if ((fb = fopen(filename, "w")))
321 adx 30 {
322 michael 2691 char buff[IRCD_BUFSIZE];
323 adx 30 unsigned int pid = (unsigned int)getpid();
324    
325 michael 1325 snprintf(buff, sizeof(buff), "%u\n", pid);
326    
327     if ((fputs(buff, fb) == -1))
328 michael 1247 ilog(LOG_TYPE_IRCD, "Error writing %u to pid file %s (%s)",
329 adx 30 pid, filename, strerror(errno));
330    
331 michael 1325 fclose(fb);
332 adx 30 }
333     else
334     {
335 michael 1247 ilog(LOG_TYPE_IRCD, "Error opening pid file %s", filename);
336 adx 30 }
337     }
338    
339     /* check_pidfile()
340     *
341     * inputs - filename+path of pid file
342     * output - none
343     * side effects - reads pid from pidfile and checks if ircd is in process
344     * list. if it is, gracefully exits
345     * -kre
346     */
347     static void
348     check_pidfile(const char *filename)
349     {
350 michael 1325 FILE *fb;
351 michael 2691 char buff[IRCD_BUFSIZE];
352 adx 30 pid_t pidfromfile;
353    
354     /* Don't do logging here, since we don't have log() initialised */
355 michael 1325 if ((fb = fopen(filename, "r")))
356 adx 30 {
357 michael 1325 if (fgets(buff, 20, fb) == NULL)
358 adx 30 {
359     /* log(L_ERROR, "Error reading from pid file %s (%s)", filename,
360     * strerror(errno));
361     */
362     }
363     else
364     {
365     pidfromfile = atoi(buff);
366    
367     if (!kill(pidfromfile, 0))
368     {
369     /* log(L_ERROR, "Server is already running"); */
370     printf("ircd: daemon is already running\n");
371     exit(-1);
372     }
373     }
374    
375 michael 1325 fclose(fb);
376 adx 30 }
377     else if (errno != ENOENT)
378     {
379     /* log(L_ERROR, "Error opening pid file %s", filename); */
380     }
381     }
382    
383     /* setup_corefile()
384     *
385     * inputs - nothing
386     * output - nothing
387     * side effects - setups corefile to system limits.
388     * -kre
389     */
390     static void
391     setup_corefile(void)
392     {
393     #ifdef HAVE_SYS_RESOURCE_H
394     struct rlimit rlim; /* resource limits */
395    
396     /* Set corefilesize to maximum */
397     if (!getrlimit(RLIMIT_CORE, &rlim))
398     {
399     rlim.rlim_cur = rlim.rlim_max;
400     setrlimit(RLIMIT_CORE, &rlim);
401     }
402     #endif
403     }
404    
405 michael 2228 #ifdef HAVE_LIBCRYPTO
406     static int
407     always_accept_verify_cb(int preverify_ok, X509_STORE_CTX *x509_ctx)
408     {
409     return 1;
410     }
411     #endif
412    
413 adx 30 /* init_ssl()
414     *
415     * inputs - nothing
416     * output - nothing
417     * side effects - setups SSL context.
418     */
419     static void
420 michael 1798 ssl_init(void)
421 adx 30 {
422     #ifdef HAVE_LIBCRYPTO
423 michael 2914 const unsigned char session_id[] = "ircd-hybrid";
424    
425 adx 30 SSL_load_error_strings();
426     SSLeay_add_ssl_algorithms();
427    
428 michael 967 if ((ServerInfo.server_ctx = SSL_CTX_new(SSLv23_server_method())) == NULL)
429 adx 30 {
430 michael 4129 const char *s = ERR_lib_error_string(ERR_get_error());
431 adx 30
432 michael 4129 fprintf(stderr, "ERROR: Could not initialize the SSL Server context -- %s\n", s);
433 michael 1303 ilog(LOG_TYPE_IRCD, "ERROR: Could not initialize the SSL Server context -- %s\n", s);
434 adx 30 }
435    
436 michael 4162 SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3);
437 michael 4161 SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_SINGLE_DH_USE);
438 michael 2228 SSL_CTX_set_verify(ServerInfo.server_ctx, SSL_VERIFY_PEER|SSL_VERIFY_CLIENT_ONCE,
439     always_accept_verify_cb);
440 michael 2914 SSL_CTX_set_session_id_context(ServerInfo.server_ctx, session_id, sizeof(session_id) - 1);
441 adx 30
442 michael 4070 #if OPENSSL_VERSION_NUMBER >= 0x1000005FL && !defined(OPENSSL_NO_ECDH)
443     {
444     EC_KEY *key = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
445    
446     if (key)
447     {
448     SSL_CTX_set_tmp_ecdh(ServerInfo.server_ctx, key);
449     EC_KEY_free(key);
450     }
451     }
452    
453     SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_SINGLE_ECDH_USE);
454     #endif
455    
456 michael 1303 if ((ServerInfo.client_ctx = SSL_CTX_new(SSLv23_client_method())) == NULL)
457     {
458 michael 4129 const char *s = ERR_lib_error_string(ERR_get_error());
459 michael 1303
460 michael 4129 fprintf(stderr, "ERROR: Could not initialize the SSL Client context -- %s\n", s);
461 michael 1303 ilog(LOG_TYPE_IRCD, "ERROR: Could not initialize the SSL Client context -- %s\n", s);
462     }
463    
464 michael 4162 SSL_CTX_set_options(ServerInfo.client_ctx, SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3);
465 michael 4161 SSL_CTX_set_options(ServerInfo.client_ctx, SSL_OP_SINGLE_DH_USE);
466 michael 2253 SSL_CTX_set_verify(ServerInfo.client_ctx, SSL_VERIFY_PEER|SSL_VERIFY_CLIENT_ONCE,
467 michael 2228 always_accept_verify_cb);
468 adx 30 #endif /* HAVE_LIBCRYPTO */
469     }
470    
471     int
472     main(int argc, char *argv[])
473     {
474 michael 2253 /* Check to see if the user is running us as root, which is a nono */
475 adx 30 if (geteuid() == 0)
476     {
477 michael 3525 fprintf(stderr, "ERROR: This server won't run as root/superuser\n");
478 michael 982 return -1;
479 adx 30 }
480    
481     /* Setup corefile size immediately after boot -kre */
482     setup_corefile();
483    
484     /* save server boot time right away, so getrusage works correctly */
485     set_time();
486    
487 michael 982 /* It ain't random, but it ought to be a little harder to guess */
488     init_genrand(SystemTime.tv_sec ^ (SystemTime.tv_usec | (getpid() << 20)));
489    
490 adx 30 me.localClient = &meLocalUser;
491 michael 2253 dlinkAdd(&me, &me.node, &global_client_list); /* Pointer to beginning
492 adx 30 of Client list */
493 michael 4080 ConfigLoggingEntry.use_logging = 1;
494 adx 30 ConfigFileEntry.dpath = DPATH;
495 michael 3239 ConfigFileEntry.spath = SPATH;
496     ConfigFileEntry.mpath = MPATH;
497 michael 1702 ConfigFileEntry.configfile = CPATH; /* Server configuration file */
498     ConfigFileEntry.klinefile = KPATH; /* Server kline file */
499 michael 1718 ConfigFileEntry.glinefile = GPATH; /* Server gline file */
500 michael 1702 ConfigFileEntry.xlinefile = XPATH; /* Server xline file */
501     ConfigFileEntry.dlinefile = DLPATH; /* dline file */
502     ConfigFileEntry.resvfile = RESVPATH; /* resv file */
503    
504 adx 30 myargv = argv;
505     umask(077); /* better safe than sorry --SRB */
506    
507     parseargs(&argc, &argv, myopts);
508    
509     if (printVersion)
510     {
511 michael 2646 printf("ircd: version %s(%s)\n", ircd_version, serno);
512 adx 30 exit(EXIT_SUCCESS);
513     }
514    
515     if (chdir(ConfigFileEntry.dpath))
516     {
517     perror("chdir");
518     exit(EXIT_FAILURE);
519     }
520    
521 michael 1798 ssl_init();
522 adx 30
523     if (!server_state.foreground)
524     {
525     make_daemon();
526     close_standard_fds(); /* this needs to be before init_netio()! */
527     }
528     else
529     print_startup(getpid());
530    
531     setup_signals();
532    
533     /* We need this to initialise the fd array before anything else */
534     fdlist_init();
535 michael 1831 log_set_file(LOG_TYPE_IRCD, 0, logFileName);
536 adx 30 check_can_use_v6();
537 michael 2632 init_netio(); /* This needs to be setup early ! -- adrian */
538 michael 2253
539 adx 30 /* Check if there is pidfile and daemon already running */
540     check_pidfile(pidFileName);
541    
542 michael 1654 mp_pool_init();
543 adx 30 init_dlink_nodes();
544 michael 2159 init_isupport();
545 adx 30 dbuf_init();
546 michael 1798 hash_init();
547 adx 30 init_ip_hash_table(); /* client host ip hash table */
548     init_host_hash(); /* Host-hashtable. */
549 michael 1798 client_init();
550 michael 1632 class_init();
551 michael 1358 whowas_init();
552 michael 876 watch_init();
553 michael 1798 auth_init(); /* Initialise the auth code */
554 michael 998 init_resolver(); /* Needs to be setup before the io loop */
555 michael 1404 modules_init();
556 adx 30 read_conf_files(1); /* cold start init conf files */
557     init_uid();
558     initialize_server_capabs(); /* Set up default_server_capabs */
559     initialize_global_set_options();
560 michael 1798 channel_init();
561 michael 2216 read_links_file();
562 michael 2150 motd_init();
563 michael 1858 #ifdef HAVE_LIBGEOIP
564     geoip_ctx = GeoIP_new(GEOIP_MEMORY_CACHE);
565     #endif
566 adx 30
567 michael 1115 if (EmptyString(ServerInfo.sid))
568 adx 30 {
569 michael 1247 ilog(LOG_TYPE_IRCD, "ERROR: No server id specified in serverinfo block.");
570 adx 30 exit(EXIT_FAILURE);
571     }
572 michael 885
573 michael 1115 strlcpy(me.id, ServerInfo.sid, sizeof(me.id));
574    
575     if (EmptyString(ServerInfo.name))
576     {
577 michael 1247 ilog(LOG_TYPE_IRCD, "ERROR: No server name specified in serverinfo block.");
578 michael 1115 exit(EXIT_FAILURE);
579     }
580    
581 adx 30 strlcpy(me.name, ServerInfo.name, sizeof(me.name));
582    
583     /* serverinfo{} description must exist. If not, error out.*/
584 michael 1115 if (EmptyString(ServerInfo.description))
585 adx 30 {
586 michael 1247 ilog(LOG_TYPE_IRCD, "ERROR: No server description specified in serverinfo block.");
587 adx 30 exit(EXIT_FAILURE);
588     }
589 michael 885
590 adx 30 strlcpy(me.info, ServerInfo.description, sizeof(me.info));
591    
592 michael 1241 me.from = &me;
593     me.servptr = &me;
594     me.localClient->lasttime = CurrentTime;
595     me.localClient->since = CurrentTime;
596     me.localClient->firsttime = CurrentTime;
597 adx 30
598     SetMe(&me);
599     make_server(&me);
600    
601 michael 1115 hash_add_id(&me);
602 adx 30 hash_add_client(&me);
603 michael 2916
604 adx 30 /* add ourselves to global_serv_list */
605     dlinkAdd(&me, make_dlink_node(), &global_serv_list);
606    
607 michael 1622 load_kline_database();
608     load_dline_database();
609     load_gline_database();
610     load_xline_database();
611     load_resv_database();
612    
613 adx 30 if (chdir(MODPATH))
614     {
615 michael 1247 ilog(LOG_TYPE_IRCD, "Could not load core modules. Terminating!");
616 adx 30 exit(EXIT_FAILURE);
617     }
618    
619     load_all_modules(1);
620     load_conf_modules();
621     load_core_modules(1);
622 michael 1115
623 adx 30 /* Go back to DPATH after checking to see if we can chdir to MODPATH */
624 michael 1115 if (chdir(ConfigFileEntry.dpath))
625     {
626     perror("chdir");
627     exit(EXIT_FAILURE);
628     }
629 michael 1121
630 adx 30 /*
631     * assemble_umode_buffer() has to be called after
632     * reading conf/loading modules.
633     */
634     assemble_umode_buffer();
635    
636     write_pidfile(pidFileName);
637    
638 michael 1247 ilog(LOG_TYPE_IRCD, "Server Ready");
639 adx 30
640 michael 4094 event_addish(&event_cleanup_glines, NULL);
641     event_addish(&event_cleanup_tklines, NULL);
642 adx 30
643     /* We want try_connections to be called as soon as possible now! -- adrian */
644     /* No, 'cause after a restart it would cause all sorts of nick collides */
645 michael 4094 event_addish(&event_try_connections, NULL);
646 adx 30
647     /* Setup the timeout check. I'll shift it later :) -- adrian */
648 michael 4094 event_addish(&event_comm_checktimeouts, NULL);
649 adx 30
650 michael 4094 event_addish(&event_save_all_databases, NULL);
651 michael 1625
652 adx 30 if (ConfigServerHide.links_delay > 0)
653 michael 4094 {
654     event_write_links_file.when = ConfigServerHide.links_delay;
655     event_addish(&event_write_links_file, NULL);
656     }
657 adx 30 else
658     ConfigServerHide.links_disabled = 1;
659    
660     if (splitmode)
661 michael 4133 event_addish(&splitmode_event, NULL);
662 adx 30
663     io_loop();
664 michael 885 return 0;
665 adx 30 }

Properties

Name Value
svn:eol-style native
svn:keywords Id Revision