From 52744f8f65a278a59a8903d5c594e057d63c7006 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Thu, 17 Jan 2008 22:06:55 +0000 Subject: Fixing some Solaris compiler warnings (u_int->uint, adding some typecasts for pid_t variables). --- unix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'unix.c') diff --git a/unix.c b/unix.c index 75ffcf95..0aaf505a 100644 --- a/unix.c +++ b/unix.c @@ -196,9 +196,9 @@ static void sighandler( int signal ) while( ( pid = waitpid( 0, &st, WNOHANG ) ) > 0 ) { if( WIFSIGNALED( st ) ) - log_message( LOGLVL_INFO, "Client %d terminated normally. (status = %d)", pid, WEXITSTATUS( st ) ); + log_message( LOGLVL_INFO, "Client %d terminated normally. (status = %d)", (int) pid, WEXITSTATUS( st ) ); else if( WIFEXITED( st ) ) - log_message( LOGLVL_INFO, "Client %d killed by signal %d.", pid, WTERMSIG( st ) ); + log_message( LOGLVL_INFO, "Client %d killed by signal %d.", (int) pid, WTERMSIG( st ) ); } } else if( signal != SIGPIPE ) -- cgit v1.2.3 From 0fbda19314c806e3e677847f3c977eb5a1bc2b61 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 2 Feb 2008 21:48:09 +0000 Subject: Added help_free() and cleaned up some very stale help-related stuff I wasn't even aware of. This closes bug #352. --- unix.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'unix.c') diff --git a/unix.c b/unix.c index 0aaf505a..9b670d78 100644 --- a/unix.c +++ b/unix.c @@ -123,11 +123,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(); -- cgit v1.2.3 From eeb85a8a880fefe655eb31b6322136b61ee969e2 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Mon, 11 Feb 2008 12:35:01 +0000 Subject: Got rid of some noise at startup: complaining when the default configuration file couldn't be found while the user specified an alternative location with the -c option, and double complaints about /var/lib/bitlbee/ permissions. --- unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'unix.c') diff --git a/unix.c b/unix.c index 9b670d78..d25aeb2e 100644 --- a/unix.c +++ b/unix.c @@ -46,7 +46,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 ); -- cgit v1.2.3