aboutsummaryrefslogtreecommitdiffstats
path: root/unix.c
diff options
context:
space:
mode:
authorSven Moritz Hallberg <sm@khjk.org>2008-02-16 18:15:31 +0100
committerSven Moritz Hallberg <sm@khjk.org>2008-02-16 18:15:31 +0100
commit4eb4c0f4beeb87e07bd6b10daed8fe8e48fb4206 (patch)
treea54ec7b6b4622aa35ef7bd1efc58ab8ec45749ae /unix.c
parent896195002cc903ec4b1ef7e1468f73c1dc08df9e (diff)
parentca605509d0b49e6012d10ae5d1553ced007e6ce7 (diff)
merge in upstream changes
Diffstat (limited to 'unix.c')
-rw-r--r--unix.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/unix.c b/unix.c
index 63ef7fae..07cb709f 100644
--- a/unix.c
+++ b/unix.c
@@ -47,7 +47,7 @@ int main( int argc, char *argv[], char **envp )
struct sigaction sig, old;
log_init();
- CONF_FILE = g_strdup( CONF_FILE_DEF );
+ global.conf_file = g_strdup( CONF_FILE_DEF );
global.conf = conf_load( argc, argv );
if( global.conf == NULL )
return( 1 );
@@ -125,11 +125,14 @@ int main( int argc, char *argv[], char **envp )
if( !getuid() || !geteuid() )
log_message( LOGLVL_WARNING, "BitlBee is running with root privileges. Why?" );
- if( help_init( &(global.help), global.helpfile ) == NULL )
+ if( help_init( &global.help, global.helpfile ) == NULL )
log_message( LOGLVL_WARNING, "Error opening helpfile %s.", HELP_FILE );
b_main_run();
+ /* Mainly good for restarting, to make sure we close the help.txt fd. */
+ help_free( &global.help );
+
if( global.restart )
{
char *fn = ipc_master_save_state();