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

Comparing ircd-hybrid-8/src/ircd.c (file contents):
Revision 1243 by michael, Fri Sep 30 10:47:53 2011 UTC vs.
Revision 1247 by michael, Sat Oct 1 07:54:24 2011 UTC

# Line 72 | Line 72 | struct server_info ServerInfo;
72   struct admin_info AdminInfo = { NULL, NULL, NULL };
73   struct Counter Count = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
74   struct ServerState_t server_state = { 0 };
75 < struct logging_entry ConfigLoggingEntry = { 1, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0} };
75 > struct logging_entry ConfigLoggingEntry = { 1 };
76   struct ServerStatistics ServerStats;
77   struct timeval SystemTime;
78   struct Client me;             /* That's me */
# Line 178 | Line 178 | set_time(void)
178  
179    if (gettimeofday(&newtime, NULL) == -1)
180    {
181 <    ilog(L_ERROR, "Clock Failure (%s), TS can be corrupted",
181 >    ilog(LOG_TYPE_IRCD, "Clock Failure (%s), TS can be corrupted",
182           strerror(errno));
183      sendto_realops_flags(UMODE_ALL, L_ALL,
184                           "Clock Failure (%s), TS can be corrupted",
# Line 351 | Line 351 | write_pidfile(const char *filename)
351      size_t nbytes = snprintf(buff, sizeof(buff), "%u\n", pid);
352  
353      if ((fbputs(buff, fb, nbytes) == -1))
354 <      ilog(L_ERROR, "Error writing %u to pid file %s (%s)",
354 >      ilog(LOG_TYPE_IRCD, "Error writing %u to pid file %s (%s)",
355             pid, filename, strerror(errno));
356  
357      fbclose(fb);
# Line 359 | Line 359 | write_pidfile(const char *filename)
359    }
360    else
361    {
362 <    ilog(L_ERROR, "Error opening pid file %s", filename);
362 >    ilog(LOG_TYPE_IRCD, "Error opening pid file %s", filename);
363    }
364   }
365  
# Line 448 | Line 448 | init_ssl(void)
448  
449      fprintf(stderr, "ERROR: Could not initialize the SSL context -- %s\n",
450              s = ERR_lib_error_string(ERR_get_error()));
451 <    ilog(L_CRIT, "ERROR: Could not initialize the SSL context -- %s\n", s);
451 >    ilog(LOG_TYPE_IRCD, "ERROR: Could not initialize the SSL context -- %s\n", s);
452    }
453  
454    SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_NO_SSLv2);
# Line 546 | Line 546 | main(int argc, char *argv[])
546    eventInit();
547    /* We need this to initialise the fd array before anything else */
548    fdlist_init();
549 <  init_log(logFileName);
549 >  log_add_file(LOG_TYPE_IRCD, 0, logFileName);
550    check_can_use_v6();
551    init_comm();         /* This needs to be setup early ! -- adrian */
552    /* Check if there is pidfile and daemon already running */
# Line 575 | Line 575 | main(int argc, char *argv[])
575  
576    if (EmptyString(ServerInfo.sid))
577    {
578 <    ilog(L_CRIT, "ERROR: No server id specified in serverinfo block.");
578 >    ilog(LOG_TYPE_IRCD, "ERROR: No server id specified in serverinfo block.");
579      exit(EXIT_FAILURE);
580    }
581  
# Line 583 | Line 583 | main(int argc, char *argv[])
583  
584    if (EmptyString(ServerInfo.name))
585    {
586 <    ilog(L_CRIT, "ERROR: No server name specified in serverinfo block.");
586 >    ilog(LOG_TYPE_IRCD, "ERROR: No server name specified in serverinfo block.");
587      exit(EXIT_FAILURE);
588    }
589  
# Line 592 | Line 592 | main(int argc, char *argv[])
592    /* serverinfo{} description must exist.  If not, error out.*/
593    if (EmptyString(ServerInfo.description))
594    {
595 <    ilog(L_CRIT, "ERROR: No server description specified in serverinfo block.");
595 >    ilog(LOG_TYPE_IRCD, "ERROR: No server description specified in serverinfo block.");
596      exit(EXIT_FAILURE);
597    }
598  
# Line 615 | Line 615 | main(int argc, char *argv[])
615  
616    if (chdir(MODPATH))
617    {
618 <    ilog(L_CRIT, "Could not load core modules. Terminating!");
618 >    ilog(LOG_TYPE_IRCD, "Could not load core modules. Terminating!");
619      exit(EXIT_FAILURE);
620    }
621  
# Line 638 | Line 638 | main(int argc, char *argv[])
638  
639    write_pidfile(pidFileName);
640  
641 <  ilog(L_NOTICE, "Server Ready");
641 >  ilog(LOG_TYPE_IRCD, "Server Ready");
642  
643    eventAddIsh("cleanup_glines", cleanup_glines, NULL, CLEANUP_GLINES_TIME);
644    eventAddIsh("cleanup_tklines", cleanup_tklines, NULL, CLEANUP_TKLINES_TIME);

Diff Legend

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