diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-06-07 15:31:07 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-06-07 15:31:07 +0100 |
commit | 4aa0f6bc5645e124738ab15ad1eb65d4147dba25 (patch) | |
tree | 0f15a76a814c33c8759c9d97253423ed12c0e1cc /unix.c | |
parent | 0d9d53ed0b3eb068cf57355a4d1465beaf191f8a (diff) | |
parent | 1fdb0a48438d6dc4a4795d195737890ed3e46a96 (diff) |
Merging killerbee stuff, bringing all the bleeding-edge stuff together.
Diffstat (limited to 'unix.c')
-rw-r--r-- | unix.c | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -55,16 +55,26 @@ int main( int argc, char *argv[] ) return crypt_main( argc, argv ); log_init(); + global.conf_file = g_strdup( CONF_FILE_DEF ); global.conf = conf_load( argc, argv ); if( global.conf == NULL ) return( 1 ); b_main_init(); - nogaim_init(); srand( time( NULL ) ^ getpid() ); + global.helpfile = g_strdup( HELP_FILE ); + if( help_init( &global.help, global.helpfile ) == NULL ) + log_message( LOGLVL_WARNING, "Error opening helpfile %s.", HELP_FILE ); + + global.storage = storage_init( global.conf->primary_storage, global.conf->migrate_storage ); + if( global.storage == NULL ) + { + log_message( LOGLVL_ERROR, "Unable to load storage backend '%s'", global.conf->primary_storage ); + return( 1 ); + } if( global.conf->runmode == RUNMODE_INETD ) { @@ -116,13 +126,6 @@ int main( int argc, char *argv[] ) setuid( pw->pw_uid ); } } - - global.storage = storage_init( global.conf->primary_storage, global.conf->migrate_storage ); - if( global.storage == NULL ) - { - log_message( LOGLVL_ERROR, "Unable to load storage backend '%s'", global.conf->primary_storage ); - return( 1 ); - } /* Catch some signals to tell the user what's happening before quitting */ memset( &sig, 0, sizeof( sig ) ); @@ -141,8 +144,6 @@ int main( int argc, char *argv[] ) if( !getuid() || !geteuid() ) log_message( LOGLVL_WARNING, "BitlBee is running with root privileges. Why?" ); - if( help_init( &global.help, global.helpfile ) == NULL ) - log_message( LOGLVL_WARNING, "Error opening helpfile %s.", HELP_FILE ); b_main_run(); |