close Warning: Failed to sync with repository "(default)": [Errno 12] Cannot allocate memory; repository information may be out of date. Look in the Trac log for more information including mitigation strategies.

Ticket #50: diff

File diff, 2.3 KB (added by yath, at 2005-12-11T23:02:16Z)
  • bitlbee-1.0

    diff -ur bitlbee-1.0/account.c bitlbee-1.0.new/account.c
    old new  
    154154                cancel_auto_reconnect( a );
    155155        }
    156156}
     157
     158void reconnect_all_accounts( void )
     159{
     160        irc_t *irc;
     161        account_t *account;
     162        GSList *ircconn;
     163       
     164        for ( ircconn = irc_connection_list; ircconn;
     165                        ircconn = ircconn->next ) {
     166                irc = ircconn->data;
     167                if ( !set_getint( irc, "auto_reconnect" ) )
     168                        continue;
     169               
     170                irc_usermsg( irc, "Reconnecting active accounts..." );
     171               
     172                for ( account = irc->accounts; account;
     173                                account = account->next ) {
     174                        if ( account->gc )
     175                                signoff( account-> gc );
     176                }
     177        }
     178}
  • bitlbee-1.0

    diff -ur bitlbee-1.0/account.h bitlbee-1.0.new/account.h
    old new  
    4545void account_del( irc_t *irc, account_t *acc );
    4646void account_on( irc_t *irc, account_t *a );
    4747void account_off( irc_t *irc, account_t *a );
     48void reconnect_all_accounts( void );
    4849
    4950#endif
  • doc/bitlbee.8

    diff -ur bitlbee-1.0/doc/bitlbee.8 bitlbee-1.0.new/doc/bitlbee.8
    old new  
    8686.SH COMMANDS
    8787To get a complete list of commands, please use the \fBhelp commands\fP
    8888command in the &bitlbee channel.
     89.SH SIGNALS
     90.IP SIGTERM
     91Sending \fBSIGTERM\fP twice causes bitlbee to exit.
     92.IP SIGUSR1
     93Upon receiving \fBSIGUSR1\fP, bitlbee reconnects all active accounts on
     94all connected clients.
    8995.SH "SEE ALSO"
    9096.BR ircd (8),
    9197.BR inetd (8),
  • bitlbee-1.0

    diff -ur bitlbee-1.0/unix.c bitlbee-1.0.new/unix.c
    old new  
    7474        memset( &sig, 0, sizeof( sig ) );
    7575        sig.sa_handler = sighandler;
    7676        sigaction( SIGPIPE, &sig, &old );
     77        sigaction( SIGUSR1, &sig, &old );
    7778        sig.sa_flags = SA_RESETHAND;
    7879        sigaction( SIGINT,  &sig, &old );
    7980        sigaction( SIGILL,  &sig, &old );
     
    126127                        raise( signal );
    127128                }
    128129        }
     130        else if( signal == SIGUSR1)
     131        {
     132                reconnect_all_accounts();
     133        }
    129134        else if( signal != SIGPIPE )
    130135        {
    131136                log_message( LOGLVL_ERROR, "Fatal signal received: %d. That's probably a bug.", signal );