diff options
Diffstat (limited to 'bitlbee.c')
-rw-r--r-- | bitlbee.c | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -132,14 +132,14 @@ gboolean bitlbee_io_current_client_read( GIOChannel *source, GIOCondition condit if( condition & G_IO_ERR || condition & G_IO_HUP ) { - irc_free( irc ); + irc_abort( irc, 1, "Read error" ); return FALSE; } st = read( irc->fd, line, sizeof( line ) - 1 ); if( st == 0 ) { - irc_free( irc ); + irc_abort( irc, 1, "Connection reset by peer" ); return FALSE; } else if( st < 0 ) @@ -150,7 +150,7 @@ gboolean bitlbee_io_current_client_read( GIOChannel *source, GIOCondition condit } else { - irc_free( irc ); + irc_abort( irc, 1, "Read error: %s", strerror( errno ) ); return FALSE; } } @@ -176,8 +176,7 @@ gboolean bitlbee_io_current_client_read( GIOChannel *source, GIOCondition condit /* Very naughty, go read the RFCs! >:) */ if( irc->readbuffer && ( strlen( irc->readbuffer ) > 1024 ) ) { - log_message( LOGLVL_ERROR, "Maximum line length exceeded." ); - irc_abort( irc ); + irc_abort( irc, 0, "Maximum line length exceeded" ); return FALSE; } @@ -198,7 +197,7 @@ gboolean bitlbee_io_current_client_write( GIOChannel *source, GIOCondition condi if( st == 0 || ( st < 0 && !sockerr_again() ) ) { - irc_free( irc ); + irc_abort( irc, 1, "Write error: %s", strerror( errno ) ); return FALSE; } else if( st < 0 ) /* && sockerr_again() */ |