ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/src/ircd.c
(Generate patch)

Comparing ircd-hybrid/branches/8.2.x/src/ircd.c (file contents):
Revision 4071 by michael, Thu Jun 26 15:42:08 2014 UTC vs.
Revision 4095 by michael, Sun Jun 29 11:51:22 2014 UTC

# Line 89 | Line 89 | unsigned int splitchecking;
89   unsigned int split_users;
90   unsigned int split_servers;
91  
92 + static struct event event_cleanup_glines =
93 + {
94 +  .name = "cleanup_glines",
95 +  .handler = cleanup_glines,
96 +  .when = CLEANUP_GLINES_TIME
97 + };
98 +
99 + static struct event event_cleanup_tklines =
100 + {
101 +  .name = "cleanup_tklines",
102 +  .handler = cleanup_tklines,
103 +  .when = CLEANUP_TKLINES_TIME
104 + };
105 +
106 + static struct event event_try_connections =
107 + {
108 +  .name = "try_connections",
109 +  .handler = try_connections,
110 +  .when = STARTUP_CONNECTIONS_TIME
111 + };
112 +
113 + static struct event event_comm_checktimeouts =
114 + {
115 +  .name = "comm_checktimeouts",
116 +  .handler = comm_checktimeouts,
117 +  .when = 1
118 + };
119 +
120 + static struct event event_save_all_databases =
121 + {
122 +  .name = "save_all_databases",
123 +  .handler = save_all_databases,
124 +  .when = DATABASE_UPDATE_TIMEOUT
125 + };
126 +
127 + struct event event_write_links_file =
128 + {
129 +  .name = "write_links_file",
130 +  .handler = write_links_file,
131 + };
132 +
133 + struct event event_check_splitmode =
134 + {
135 +  .name = "check_splitmode",
136 +  .handler = check_splitmode,
137 +  .when = 60
138 + };
139 +
140   /*
141   * print_startup - print startup information
142   */
# Line 190 | Line 238 | io_loop(void)
238          safe_list_channels(ptr->data, 0);
239      }
240  
241 <    /* Run pending events, then get the number of seconds to the next
242 <     * event
195 <     */
196 <    while (eventNextTime() <= CurrentTime)
197 <      eventRun();
241 >    /* Run pending events */
242 >    event_run();
243  
244      comm_select();
245      exit_aborted_clients();
# Line 401 | Line 446 | ssl_init(void)
446    }
447  
448    SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3|SSL_OP_NO_TLSv1);
449 <  SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_TLS_ROLLBACK_BUG|SSL_OP_ALL);
449 >  SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_TLS_ROLLBACK_BUG);
450    SSL_CTX_set_verify(ServerInfo.server_ctx, SSL_VERIFY_PEER|SSL_VERIFY_CLIENT_ONCE,
451                       always_accept_verify_cb);
452    SSL_CTX_set_session_id_context(ServerInfo.server_ctx, session_id, sizeof(session_id) - 1);
# Line 430 | Line 475 | ssl_init(void)
475    }
476  
477    SSL_CTX_set_options(ServerInfo.client_ctx, SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3|SSL_OP_NO_TLSv1);
478 <  SSL_CTX_set_options(ServerInfo.client_ctx, SSL_OP_TLS_ROLLBACK_BUG|SSL_OP_ALL);
478 >  SSL_CTX_set_options(ServerInfo.client_ctx, SSL_OP_TLS_ROLLBACK_BUG);
479    SSL_CTX_set_verify(ServerInfo.client_ctx, SSL_VERIFY_PEER|SSL_VERIFY_CLIENT_ONCE,
480                       always_accept_verify_cb);
481   #endif /* HAVE_LIBCRYPTO */
# Line 458 | Line 503 | main(int argc, char *argv[])
503    me.localClient = &meLocalUser;
504    dlinkAdd(&me, &me.node, &global_client_list);  /* Pointer to beginning
505                                                     of Client list */
506 +  ConfigLoggingEntry.use_logging = 1;
507    ConfigFileEntry.dpath      = DPATH;
508    ConfigFileEntry.spath      = SPATH;
509    ConfigFileEntry.mpath      = MPATH;
# Line 497 | Line 543 | main(int argc, char *argv[])
543  
544    setup_signals();
545  
500  /* Init the event subsystem */
501  eventInit();
502
546    /* We need this to initialise the fd array before anything else */
547    fdlist_init();
548    log_set_file(LOG_TYPE_IRCD, 0, logFileName);
# Line 607 | Line 650 | main(int argc, char *argv[])
650  
651    ilog(LOG_TYPE_IRCD, "Server Ready");
652  
653 <  eventAddIsh("cleanup_glines", cleanup_glines, NULL, CLEANUP_GLINES_TIME);
654 <  eventAddIsh("cleanup_tklines", cleanup_tklines, NULL, CLEANUP_TKLINES_TIME);
653 >  event_addish(&event_cleanup_glines, NULL);
654 >  event_addish(&event_cleanup_tklines, NULL);
655  
656    /* We want try_connections to be called as soon as possible now! -- adrian */
657    /* No, 'cause after a restart it would cause all sorts of nick collides */
658 <  eventAddIsh("try_connections", try_connections, NULL, STARTUP_CONNECTIONS_TIME);
658 >  event_addish(&event_try_connections, NULL);
659  
660    /* Setup the timeout check. I'll shift it later :)  -- adrian */
661 <  eventAddIsh("comm_checktimeouts", comm_checktimeouts, NULL, 1);
661 >  event_addish(&event_comm_checktimeouts, NULL);
662  
663 <  eventAddIsh("save_all_databases", save_all_databases, NULL, DATABASE_UPDATE_TIMEOUT);
663 >  event_addish(&event_save_all_databases, NULL);
664  
665    if (ConfigServerHide.links_delay > 0)
666 <    eventAddIsh("write_links_file", write_links_file, NULL, ConfigServerHide.links_delay);
666 >  {
667 >    event_write_links_file.when = ConfigServerHide.links_delay;
668 >    event_addish(&event_write_links_file, NULL);
669 >  }
670    else
671      ConfigServerHide.links_disabled = 1;
672  
673    if (splitmode)
674 <    eventAddIsh("check_splitmode", check_splitmode, NULL, 60);
674 >    event_addish(&event_check_splitmode, NULL);
675  
676    io_loop();
677    return 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)