ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/ircd.c
Revision: 5460
Committed: Tue Feb 3 22:24:57 2015 UTC (10 years, 6 months ago) by michael
Content type: text/x-csrc
File size: 16631 byte(s)
Log Message:
- Minor cleanups here and there

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

Properties

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