ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/src/ircd.c
Revision: 2980
Committed: Fri Jan 31 19:15:05 2014 UTC (10 years, 2 months ago) by michael
Content type: text/x-csrc
Original Path: ircd-hybrid/trunk/src/ircd.c
File size: 17335 byte(s)
Log Message:
- ircd.c:set_time(): replaced snprintf/report_error combo with
  ilog/sendto_realops_flags

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     #include "s_user.h"
29 michael 1011 #include "list.h"
30 adx 30 #include "ircd.h"
31     #include "channel.h"
32     #include "channel_mode.h"
33     #include "client.h"
34     #include "event.h"
35     #include "fdlist.h"
36     #include "hash.h"
37     #include "irc_string.h"
38     #include "ircd_signal.h"
39     #include "s_gline.h"
40     #include "motd.h"
41 michael 1632 #include "conf.h"
42 adx 30 #include "hostmask.h"
43     #include "numeric.h"
44     #include "packet.h"
45     #include "parse.h"
46     #include "irc_res.h"
47     #include "restart.h"
48 michael 982 #include "rng_mt.h"
49 adx 30 #include "s_auth.h"
50     #include "s_bsd.h"
51 michael 1309 #include "log.h"
52 adx 30 #include "s_misc.h"
53     #include "s_serv.h" /* try_connections */
54     #include "send.h"
55     #include "whowas.h"
56     #include "modules.h"
57     #include "memory.h"
58 michael 1654 #include "mempool.h"
59 adx 30 #include "hook.h"
60     #include "ircd_getopt.h"
61     #include "supported.h"
62 michael 876 #include "watch.h"
63 michael 1622 #include "conf_db.h"
64 michael 1632 #include "conf_class.h"
65 adx 30
66 michael 1858
67     #ifdef HAVE_LIBGEOIP
68     GeoIP *geoip_ctx;
69     #endif
70 michael 2872
71 adx 30 /* /quote set variables */
72     struct SetOptions GlobalSetOptions;
73 michael 2872 struct Counter Count;
74     struct ServerState_t server_state;
75 michael 896 struct ServerStatistics ServerStats;
76 adx 30 struct timeval SystemTime;
77     struct Client me; /* That's me */
78     struct LocalUser meLocalUser; /* That's also part of me */
79    
80     const char *logFileName = LPATH;
81     const char *pidFileName = PPATH;
82    
83     char **myargv;
84    
85     int dorehash = 0;
86     int doremotd = 0;
87    
88     /* Set to zero because it should be initialized later using
89     * initialize_server_capabs
90     */
91     int default_server_capabs = 0;
92 michael 1013 unsigned int splitmode;
93     unsigned int splitchecking;
94     unsigned int split_users;
95 adx 30 unsigned int split_servers;
96    
97     /* Do klines the same way hybrid-6 did them, i.e. at the
98     * top of the next io_loop instead of in the same loop as
99     * the klines are being applied.
100     *
101     * This should fix strange CPU starvation as very indirectly reported.
102     * (Why do you people not email bug reports? WHY? WHY?)
103     *
104     * - Dianora
105     */
106    
107     int rehashed_klines = 0;
108    
109    
110     /*
111     * print_startup - print startup information
112     */
113     static void
114     print_startup(int pid)
115     {
116 michael 2646 printf("ircd: version %s(%s)\n", ircd_version, serno);
117 adx 30 printf("ircd: pid %d\n", pid);
118     printf("ircd: running in %s mode from %s\n", !server_state.foreground ? "background"
119     : "foreground", ConfigFileEntry.dpath);
120     }
121    
122     static void
123     make_daemon(void)
124     {
125     int pid;
126    
127     if ((pid = fork()) < 0)
128     {
129     perror("fork");
130     exit(EXIT_FAILURE);
131     }
132     else if (pid > 0)
133     {
134     print_startup(pid);
135     exit(EXIT_SUCCESS);
136     }
137    
138     setsid();
139     }
140    
141     static int printVersion = 0;
142    
143 michael 1357 static struct lgetopt myopts[] = {
144 michael 2916 {"configfile", &ConfigFileEntry.configfile,
145 adx 30 STRING, "File to use for ircd.conf"},
146 michael 1718 {"glinefile", &ConfigFileEntry.glinefile,
147     STRING, "File to use for gline database"},
148 michael 2916 {"klinefile", &ConfigFileEntry.klinefile,
149 michael 1718 STRING, "File to use for kline database"},
150     {"dlinefile", &ConfigFileEntry.dlinefile,
151     STRING, "File to use for dline database"},
152 michael 2916 {"xlinefile", &ConfigFileEntry.xlinefile,
153 michael 1718 STRING, "File to use for xline database"},
154     {"resvfile", &ConfigFileEntry.resvfile,
155     STRING, "File to use for resv database"},
156 michael 2916 {"logfile", &logFileName,
157 adx 30 STRING, "File to use for ircd.log"},
158     {"pidfile", &pidFileName,
159     STRING, "File to use for process ID"},
160 michael 2916 {"foreground", &server_state.foreground,
161 adx 30 YESNO, "Run in foreground (don't detach)"},
162 michael 2916 {"version", &printVersion,
163 adx 30 YESNO, "Print version and exit"},
164     {"help", NULL, USAGE, "Print this text"},
165     {NULL, NULL, STRING, NULL},
166     };
167    
168     void
169     set_time(void)
170     {
171 michael 2978 struct timeval newtime = { .tv_sec = 0, .tv_usec = 0 };
172 adx 30
173     if (gettimeofday(&newtime, NULL) == -1)
174     {
175 michael 1247 ilog(LOG_TYPE_IRCD, "Clock Failure (%s), TS can be corrupted",
176 adx 30 strerror(errno));
177 michael 1618 sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
178 adx 30 "Clock Failure (%s), TS can be corrupted",
179     strerror(errno));
180     restart("Clock Failure");
181     }
182    
183     if (newtime.tv_sec < CurrentTime)
184     {
185 michael 2980 ilog(LOG_TYPE_IRCD, "System clock is running backwards - (%lu < %lu)",
186     (unsigned long)newtime.tv_sec, (unsigned long)CurrentTime);
187     sendto_realops_flags(UMODE_DEBUG, L_ALL, SEND_NOTICE,
188     "System clock is running backwards - (%lu < %lu)",
189     (unsigned long)newtime.tv_sec,
190     (unsigned long)CurrentTime);
191 adx 30 set_back_events(CurrentTime - newtime.tv_sec);
192     }
193    
194     SystemTime.tv_sec = newtime.tv_sec;
195     SystemTime.tv_usec = newtime.tv_usec;
196     }
197    
198     static void
199     io_loop(void)
200     {
201     while (1 == 1)
202     {
203     /*
204     * Maybe we want a flags word?
205 michael 2916 * ie. if (REHASHED_KLINES(global_flags))
206 adx 30 * SET_REHASHED_KLINES(global_flags)
207     * CLEAR_REHASHED_KLINES(global_flags)
208     *
209     * - Dianora
210     */
211     if (rehashed_klines)
212     {
213     check_conf_klines();
214     rehashed_klines = 0;
215     }
216    
217     if (listing_client_list.head)
218     {
219     dlink_node *ptr = NULL, *ptr_next = NULL;
220     DLINK_FOREACH_SAFE(ptr, ptr_next, listing_client_list.head)
221     {
222     struct Client *client_p = ptr->data;
223     assert(client_p->localClient->list_task);
224 michael 896 safe_list_channels(client_p, client_p->localClient->list_task, 0);
225 adx 30 }
226     }
227    
228     /* Run pending events, then get the number of seconds to the next
229     * event
230     */
231     while (eventNextTime() <= CurrentTime)
232     eventRun();
233    
234     comm_select();
235     exit_aborted_clients();
236     free_exited_clients();
237    
238     /* Check to see whether we have to rehash the configuration .. */
239     if (dorehash)
240     {
241     rehash(1);
242     dorehash = 0;
243     }
244     if (doremotd)
245     {
246 michael 2150 motd_recache();
247 michael 1618 sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
248 michael 2150 "Got signal SIGUSR1, reloading motd files");
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 2330 // add_capability("FAKEHOST", CAP_FAKEHOST, 1);
305 michael 1196 add_capability("SVS", CAP_SVS, 1);
306 adx 30 #ifdef HALFOPS
307     add_capability("HOPS", CAP_HOPS, 1);
308     #endif
309     }
310    
311     /* write_pidfile()
312     *
313     * inputs - filename+path of pid file
314     * output - NONE
315     * side effects - write the pid of the ircd to filename
316     */
317     static void
318     write_pidfile(const char *filename)
319     {
320 michael 1325 FILE *fb;
321 adx 30
322 michael 1325 if ((fb = fopen(filename, "w")))
323 adx 30 {
324 michael 2691 char buff[IRCD_BUFSIZE];
325 adx 30 unsigned int pid = (unsigned int)getpid();
326    
327 michael 1325 snprintf(buff, sizeof(buff), "%u\n", pid);
328    
329     if ((fputs(buff, fb) == -1))
330 michael 1247 ilog(LOG_TYPE_IRCD, "Error writing %u to pid file %s (%s)",
331 adx 30 pid, filename, strerror(errno));
332    
333 michael 1325 fclose(fb);
334 adx 30 }
335     else
336     {
337 michael 1247 ilog(LOG_TYPE_IRCD, "Error opening pid file %s", filename);
338 adx 30 }
339     }
340    
341     /* check_pidfile()
342     *
343     * inputs - filename+path of pid file
344     * output - none
345     * side effects - reads pid from pidfile and checks if ircd is in process
346     * list. if it is, gracefully exits
347     * -kre
348     */
349     static void
350     check_pidfile(const char *filename)
351     {
352 michael 1325 FILE *fb;
353 michael 2691 char buff[IRCD_BUFSIZE];
354 adx 30 pid_t pidfromfile;
355    
356     /* Don't do logging here, since we don't have log() initialised */
357 michael 1325 if ((fb = fopen(filename, "r")))
358 adx 30 {
359 michael 1325 if (fgets(buff, 20, fb) == NULL)
360 adx 30 {
361     /* log(L_ERROR, "Error reading from pid file %s (%s)", filename,
362     * strerror(errno));
363     */
364     }
365     else
366     {
367     pidfromfile = atoi(buff);
368    
369     if (!kill(pidfromfile, 0))
370     {
371     /* log(L_ERROR, "Server is already running"); */
372     printf("ircd: daemon is already running\n");
373     exit(-1);
374     }
375     }
376    
377 michael 1325 fclose(fb);
378 adx 30 }
379     else if (errno != ENOENT)
380     {
381     /* log(L_ERROR, "Error opening pid file %s", filename); */
382     }
383     }
384    
385     /* setup_corefile()
386     *
387     * inputs - nothing
388     * output - nothing
389     * side effects - setups corefile to system limits.
390     * -kre
391     */
392     static void
393     setup_corefile(void)
394     {
395     #ifdef HAVE_SYS_RESOURCE_H
396     struct rlimit rlim; /* resource limits */
397    
398     /* Set corefilesize to maximum */
399     if (!getrlimit(RLIMIT_CORE, &rlim))
400     {
401     rlim.rlim_cur = rlim.rlim_max;
402     setrlimit(RLIMIT_CORE, &rlim);
403     }
404     #endif
405     }
406    
407 michael 2228 #ifdef HAVE_LIBCRYPTO
408     static int
409     always_accept_verify_cb(int preverify_ok, X509_STORE_CTX *x509_ctx)
410     {
411     return 1;
412     }
413     #endif
414    
415 adx 30 /* init_ssl()
416     *
417     * inputs - nothing
418     * output - nothing
419     * side effects - setups SSL context.
420     */
421     static void
422 michael 1798 ssl_init(void)
423 adx 30 {
424     #ifdef HAVE_LIBCRYPTO
425 michael 2914 const unsigned char session_id[] = "ircd-hybrid";
426    
427 adx 30 SSL_load_error_strings();
428     SSLeay_add_ssl_algorithms();
429    
430 michael 967 if ((ServerInfo.server_ctx = SSL_CTX_new(SSLv23_server_method())) == NULL)
431 adx 30 {
432     const char *s;
433    
434 michael 1303 fprintf(stderr, "ERROR: Could not initialize the SSL Server context -- %s\n",
435 adx 30 s = ERR_lib_error_string(ERR_get_error()));
436 michael 1303 ilog(LOG_TYPE_IRCD, "ERROR: Could not initialize the SSL Server context -- %s\n", s);
437 adx 30 }
438    
439 michael 1316 SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3|SSL_OP_NO_TLSv1);
440 michael 967 SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_TLS_ROLLBACK_BUG|SSL_OP_ALL);
441 michael 2228 SSL_CTX_set_verify(ServerInfo.server_ctx, SSL_VERIFY_PEER|SSL_VERIFY_CLIENT_ONCE,
442     always_accept_verify_cb);
443 michael 2914 SSL_CTX_set_session_id_context(ServerInfo.server_ctx, session_id, sizeof(session_id) - 1);
444 adx 30
445 michael 1303 if ((ServerInfo.client_ctx = SSL_CTX_new(SSLv23_client_method())) == NULL)
446     {
447     const char *s;
448    
449     fprintf(stderr, "ERROR: Could not initialize the SSL Client context -- %s\n",
450     s = ERR_lib_error_string(ERR_get_error()));
451     ilog(LOG_TYPE_IRCD, "ERROR: Could not initialize the SSL Client context -- %s\n", s);
452     }
453    
454 michael 1316 SSL_CTX_set_options(ServerInfo.client_ctx, SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3|SSL_OP_NO_TLSv1);
455 michael 1303 SSL_CTX_set_options(ServerInfo.client_ctx, SSL_OP_TLS_ROLLBACK_BUG|SSL_OP_ALL);
456 michael 2253 SSL_CTX_set_verify(ServerInfo.client_ctx, SSL_VERIFY_PEER|SSL_VERIFY_CLIENT_ONCE,
457 michael 2228 always_accept_verify_cb);
458 adx 30 #endif /* HAVE_LIBCRYPTO */
459     }
460    
461     int
462     main(int argc, char *argv[])
463     {
464 michael 2253 /* Check to see if the user is running us as root, which is a nono */
465 adx 30 if (geteuid() == 0)
466     {
467     fprintf(stderr, "Don't run ircd as root!!!\n");
468 michael 982 return -1;
469 adx 30 }
470    
471     /* Setup corefile size immediately after boot -kre */
472     setup_corefile();
473    
474     /* save server boot time right away, so getrusage works correctly */
475     set_time();
476    
477 michael 982 /* It ain't random, but it ought to be a little harder to guess */
478     init_genrand(SystemTime.tv_sec ^ (SystemTime.tv_usec | (getpid() << 20)));
479    
480 adx 30 me.localClient = &meLocalUser;
481 michael 2253 dlinkAdd(&me, &me.node, &global_client_list); /* Pointer to beginning
482 adx 30 of Client list */
483     /* Initialise the channel capability usage counts... */
484     init_chcap_usage_counts();
485    
486     ConfigFileEntry.dpath = DPATH;
487 michael 1702 ConfigFileEntry.configfile = CPATH; /* Server configuration file */
488     ConfigFileEntry.klinefile = KPATH; /* Server kline file */
489 michael 1718 ConfigFileEntry.glinefile = GPATH; /* Server gline file */
490 michael 1702 ConfigFileEntry.xlinefile = XPATH; /* Server xline file */
491     ConfigFileEntry.dlinefile = DLPATH; /* dline file */
492     ConfigFileEntry.resvfile = RESVPATH; /* resv file */
493    
494 adx 30 myargv = argv;
495     umask(077); /* better safe than sorry --SRB */
496    
497     parseargs(&argc, &argv, myopts);
498    
499     if (printVersion)
500     {
501 michael 2646 printf("ircd: version %s(%s)\n", ircd_version, serno);
502 adx 30 exit(EXIT_SUCCESS);
503     }
504    
505     if (chdir(ConfigFileEntry.dpath))
506     {
507     perror("chdir");
508     exit(EXIT_FAILURE);
509     }
510    
511 michael 1798 ssl_init();
512 adx 30
513     if (!server_state.foreground)
514     {
515     make_daemon();
516     close_standard_fds(); /* this needs to be before init_netio()! */
517     }
518     else
519     print_startup(getpid());
520    
521     setup_signals();
522    
523     /* Init the event subsystem */
524     eventInit();
525 michael 2253
526 adx 30 /* We need this to initialise the fd array before anything else */
527     fdlist_init();
528 michael 1831 log_set_file(LOG_TYPE_IRCD, 0, logFileName);
529 adx 30 check_can_use_v6();
530 michael 2632 init_netio(); /* This needs to be setup early ! -- adrian */
531 michael 2253
532 adx 30 /* Check if there is pidfile and daemon already running */
533     check_pidfile(pidFileName);
534    
535 michael 1654 mp_pool_init();
536 adx 30 init_dlink_nodes();
537 michael 2159 init_isupport();
538 adx 30 dbuf_init();
539 michael 1798 hash_init();
540 adx 30 init_ip_hash_table(); /* client host ip hash table */
541     init_host_hash(); /* Host-hashtable. */
542 michael 1798 client_init();
543 michael 1632 class_init();
544 michael 1358 whowas_init();
545 michael 876 watch_init();
546 michael 1798 auth_init(); /* Initialise the auth code */
547 michael 998 init_resolver(); /* Needs to be setup before the io loop */
548 michael 1404 modules_init();
549 adx 30 read_conf_files(1); /* cold start init conf files */
550     init_uid();
551     initialize_server_capabs(); /* Set up default_server_capabs */
552     initialize_global_set_options();
553 michael 1798 channel_init();
554 michael 2216 read_links_file();
555 michael 2150 motd_init();
556 michael 1858 #ifdef HAVE_LIBGEOIP
557     geoip_ctx = GeoIP_new(GEOIP_MEMORY_CACHE);
558     #endif
559 adx 30
560 michael 1115 if (EmptyString(ServerInfo.sid))
561 adx 30 {
562 michael 1247 ilog(LOG_TYPE_IRCD, "ERROR: No server id specified in serverinfo block.");
563 adx 30 exit(EXIT_FAILURE);
564     }
565 michael 885
566 michael 1115 strlcpy(me.id, ServerInfo.sid, sizeof(me.id));
567    
568     if (EmptyString(ServerInfo.name))
569     {
570 michael 1247 ilog(LOG_TYPE_IRCD, "ERROR: No server name specified in serverinfo block.");
571 michael 1115 exit(EXIT_FAILURE);
572     }
573    
574 adx 30 strlcpy(me.name, ServerInfo.name, sizeof(me.name));
575    
576     /* serverinfo{} description must exist. If not, error out.*/
577 michael 1115 if (EmptyString(ServerInfo.description))
578 adx 30 {
579 michael 1247 ilog(LOG_TYPE_IRCD, "ERROR: No server description specified in serverinfo block.");
580 adx 30 exit(EXIT_FAILURE);
581     }
582 michael 885
583 adx 30 strlcpy(me.info, ServerInfo.description, sizeof(me.info));
584    
585 michael 1241 me.from = &me;
586     me.servptr = &me;
587     me.localClient->lasttime = CurrentTime;
588     me.localClient->since = CurrentTime;
589     me.localClient->firsttime = CurrentTime;
590 adx 30
591     SetMe(&me);
592     make_server(&me);
593    
594 michael 1115 hash_add_id(&me);
595 adx 30 hash_add_client(&me);
596 michael 2916
597 adx 30 /* add ourselves to global_serv_list */
598     dlinkAdd(&me, make_dlink_node(), &global_serv_list);
599    
600 michael 1622 load_kline_database();
601     load_dline_database();
602     load_gline_database();
603     load_xline_database();
604     load_resv_database();
605    
606 adx 30 if (chdir(MODPATH))
607     {
608 michael 1247 ilog(LOG_TYPE_IRCD, "Could not load core modules. Terminating!");
609 adx 30 exit(EXIT_FAILURE);
610     }
611    
612     load_all_modules(1);
613     load_conf_modules();
614     load_core_modules(1);
615 michael 1115
616 adx 30 /* Go back to DPATH after checking to see if we can chdir to MODPATH */
617 michael 1115 if (chdir(ConfigFileEntry.dpath))
618     {
619     perror("chdir");
620     exit(EXIT_FAILURE);
621     }
622 michael 1121
623 adx 30 /*
624     * assemble_umode_buffer() has to be called after
625     * reading conf/loading modules.
626     */
627     assemble_umode_buffer();
628    
629     write_pidfile(pidFileName);
630    
631 michael 1247 ilog(LOG_TYPE_IRCD, "Server Ready");
632 adx 30
633     eventAddIsh("cleanup_glines", cleanup_glines, NULL, CLEANUP_GLINES_TIME);
634     eventAddIsh("cleanup_tklines", cleanup_tklines, NULL, CLEANUP_TKLINES_TIME);
635    
636     /* We want try_connections to be called as soon as possible now! -- adrian */
637     /* No, 'cause after a restart it would cause all sorts of nick collides */
638     eventAddIsh("try_connections", try_connections, NULL, STARTUP_CONNECTIONS_TIME);
639    
640     /* Setup the timeout check. I'll shift it later :) -- adrian */
641     eventAddIsh("comm_checktimeouts", comm_checktimeouts, NULL, 1);
642    
643 michael 1625 eventAddIsh("save_all_databases", save_all_databases, NULL, DATABASE_UPDATE_TIMEOUT);
644    
645 adx 30 if (ConfigServerHide.links_delay > 0)
646     eventAddIsh("write_links_file", write_links_file, NULL, ConfigServerHide.links_delay);
647     else
648     ConfigServerHide.links_disabled = 1;
649    
650     if (splitmode)
651     eventAddIsh("check_splitmode", check_splitmode, NULL, 60);
652    
653     io_loop();
654 michael 885 return 0;
655 adx 30 }

Properties

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