- Timestamp:
- 2006-05-07T18:07:43Z (18 years ago)
- Branches:
- master
- Children:
- ecf8fa8
- Parents:
- 64d1f45
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
irc.c
r64d1f45 ra0d04d6 54 54 55 55 irc->fd = fd; 56 irc->io_channel = g_io_channel_unix_new( fd ); 57 #ifdef GLIB2 58 g_io_channel_set_encoding (irc->io_channel, NULL, NULL); 59 g_io_channel_set_buffered (irc->io_channel, FALSE); 60 g_io_channel_set_flags( irc->io_channel, G_IO_FLAG_NONBLOCK, NULL ); 61 #else 62 fcntl( irc->fd, F_SETFL, O_NONBLOCK); 63 #endif 64 irc->r_watch_source_id = g_io_add_watch( irc->io_channel, G_IO_IN | G_IO_ERR | G_IO_HUP, bitlbee_io_current_client_read, irc ); 56 sock_make_nonblocking( irc->fd ); 57 58 irc->r_watch_source_id = gaim_input_add( irc->fd, GAIM_INPUT_READ, bitlbee_io_current_client_read, irc ); 65 59 66 60 irc->status = USTATUS_OFFLINE; … … 229 223 g_source_remove( irc->w_watch_source_id ); 230 224 231 g_io_channel_unref( irc->io_channel );232 225 irc_connection_list = g_slist_remove( irc_connection_list, irc ); 233 226 … … 600 593 strcat( line, "\r\n" ); 601 594 602 if( irc->sendbuffer != NULL ) { 595 if( irc->sendbuffer != NULL ) 596 { 603 597 size = strlen( irc->sendbuffer ) + strlen( line ); 604 598 irc->sendbuffer = g_renew ( char, irc->sendbuffer, size + 1 ); 605 599 strcpy( ( irc->sendbuffer + strlen( irc->sendbuffer ) ), line ); 606 600 } 607 else 608 irc->sendbuffer = g_strdup(line); 601 else 602 { 603 irc->sendbuffer = g_strdup(line); 604 } 609 605 610 606 if( irc->w_watch_source_id == 0 ) 611 { 612 irc->w_watch_source_id = g_io_add_watch( irc->io_channel, G_IO_OUT, bitlbee_io_current_client_write, irc ); 613 } 607 irc->w_watch_source_id = gaim_input_add( irc->fd, GAIM_INPUT_WRITE, bitlbee_io_current_client_write, irc ); 614 608 615 609 return; … … 636 630 if( now ) 637 631 { 638 bitlbee_io_current_client_write( irc ->io_channel, G_IO_OUT, irc);632 bitlbee_io_current_client_write( irc, irc->fd, GAIM_INPUT_WRITE ); 639 633 } 640 634 temp = temp->next;
Note: See TracChangeset
for help on using the changeset viewer.