Changeset 92ad3d4 for irc.c


Ignore:
Timestamp:
2006-01-18T22:15:09Z (18 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
e8f8b18
Parents:
d990997 (diff), c1826c6 (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.
Message:

Merging changes from laptop: Now tries to empty sendbuffer before closing the connection,
and fixed some error checking flaw in bitlbee_io_current_client_write() that was also
present in the _read() version before 0.99 (and actually caused the 100% CPU bug that kept
us from releasing 1.0).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc.c

    rd990997 r92ad3d4  
    151151}
    152152
     153void irc_abort( irc_t *irc )
     154{
     155        irc->status = USTATUS_SHUTDOWN;
     156        if( irc->sendbuffer )
     157        {
     158                g_source_remove( irc->r_watch_source_id );
     159                irc->r_watch_source_id = g_timeout_add_full( G_PRIORITY_HIGH, 1000, (GSourceFunc) irc_free, irc, NULL );
     160        }
     161        else
     162        {
     163                irc_free( irc );
     164        }
     165}
     166
    153167static gboolean irc_free_userhash( gpointer key, gpointer value, gpointer data )
    154168{
     
    159173
    160174/* Because we have no garbage collection, this is quite annoying */
    161 void irc_free(irc_t * irc)
     175void irc_free( irc_t * irc )
    162176{
    163177        account_t *account, *accounttmp;
     
    496510        {
    497511                irc_write( irc, "ERROR :%s%s", cmd[1]?"Quit: ":"", cmd[1]?cmd[1]:"Client Quit" );
    498                 g_io_channel_close( irc->io_channel );
     512                /* g_io_channel_close( irc->io_channel ); */
    499513                return( 0 );
    500514        }
Note: See TracChangeset for help on using the changeset viewer.