- Timestamp:
- 2010-06-05T23:21:02Z (14 years ago)
- Branches:
- master
- Children:
- 1fdb0a4
- Parents:
- 3ab1d31 (diff), e774815 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
unix.c
r3ab1d31 rb308cf9 56 56 57 57 log_init(); 58 58 59 global.conf_file = g_strdup( CONF_FILE_DEF ); 59 60 global.conf = conf_load( argc, argv ); … … 62 63 63 64 b_main_init(); 64 nogaim_init();65 65 66 66 srand( time( NULL ) ^ getpid() ); 67 67 68 global.helpfile = g_strdup( HELP_FILE ); 69 if( help_init( &global.help, global.helpfile ) == NULL ) 70 log_message( LOGLVL_WARNING, "Error opening helpfile %s.", HELP_FILE ); 71 72 global.storage = storage_init( global.conf->primary_storage, global.conf->migrate_storage ); 73 if( global.storage == NULL ) 74 { 75 log_message( LOGLVL_ERROR, "Unable to load storage backend '%s'", global.conf->primary_storage ); 76 return( 1 ); 77 } 68 78 69 79 if( global.conf->runmode == RUNMODE_INETD ) … … 73 83 74 84 i = bitlbee_inetd_init(); 75 log_message( LOGLVL_INFO, "Bitl bee %s starting in inetd mode.", BITLBEE_VERSION );85 log_message( LOGLVL_INFO, "BitlBee %s starting in inetd mode.", BITLBEE_VERSION ); 76 86 77 87 } 78 88 else if( global.conf->runmode == RUNMODE_DAEMON ) 79 89 { 80 log_link( LOGLVL_ERROR, LOGOUTPUT_ SYSLOG);81 log_link( LOGLVL_WARNING, LOGOUTPUT_ SYSLOG);90 log_link( LOGLVL_ERROR, LOGOUTPUT_CONSOLE ); 91 log_link( LOGLVL_WARNING, LOGOUTPUT_CONSOLE ); 82 92 83 93 i = bitlbee_daemon_init(); 84 log_message( LOGLVL_INFO, "Bitl bee %s starting in daemon mode.", BITLBEE_VERSION );94 log_message( LOGLVL_INFO, "BitlBee %s starting in daemon mode.", BITLBEE_VERSION ); 85 95 } 86 96 else if( global.conf->runmode == RUNMODE_FORKDAEMON ) 87 97 { 98 log_link( LOGLVL_ERROR, LOGOUTPUT_CONSOLE ); 99 log_link( LOGLVL_WARNING, LOGOUTPUT_CONSOLE ); 100 88 101 /* In case the operator requests a restart, we need this. */ 89 102 old_cwd = g_malloc( 256 ); … … 96 109 97 110 i = bitlbee_daemon_init(); 98 log_message( LOGLVL_INFO, "Bitl bee %s starting in forking daemon mode.", BITLBEE_VERSION );111 log_message( LOGLVL_INFO, "BitlBee %s starting in forking daemon mode.", BITLBEE_VERSION ); 99 112 } 100 113 if( i != 0 ) … … 113 126 setuid( pw->pw_uid ); 114 127 } 115 }116 117 global.storage = storage_init( global.conf->primary_storage, global.conf->migrate_storage );118 if( global.storage == NULL )119 {120 log_message( LOGLVL_ERROR, "Unable to load storage backend '%s'", global.conf->primary_storage );121 return( 1 );122 128 } 123 129 … … 139 145 if( !getuid() || !geteuid() ) 140 146 log_message( LOGLVL_WARNING, "BitlBee is running with root privileges. Why?" ); 141 if( help_init( &global.help, global.helpfile ) == NULL )142 log_message( LOGLVL_WARNING, "Error opening helpfile %s.", HELP_FILE );143 147 144 148 b_main_run();
Note: See TracChangeset
for help on using the changeset viewer.