aboutsummaryrefslogtreecommitdiffstats
path: root/dcc.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-06-07 15:31:07 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-06-07 15:31:07 +0100
commit4aa0f6bc5645e124738ab15ad1eb65d4147dba25 (patch)
tree0f15a76a814c33c8759c9d97253423ed12c0e1cc /dcc.c
parent0d9d53ed0b3eb068cf57355a4d1465beaf191f8a (diff)
parent1fdb0a48438d6dc4a4795d195737890ed3e46a96 (diff)
Merging killerbee stuff, bringing all the bleeding-edge stuff together.
Diffstat (limited to 'dcc.c')
-rw-r--r--dcc.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/dcc.c b/dcc.c
index 470acccc..ecce7db4 100644
--- a/dcc.c
+++ b/dcc.c
@@ -115,7 +115,7 @@ file_transfer_t *dccs_send_start( struct im_connection *ic, irc_user_t *iu, cons
return NULL;
/* watch */
- df->watch_in = b_input_add( df->fd, GAIM_INPUT_READ, dccs_send_proto, df );
+ df->watch_in = b_input_add( df->fd, B_EV_IO_READ, dccs_send_proto, df );
irc->file_transfers = g_slist_prepend( irc->file_transfers, file );
@@ -227,7 +227,7 @@ gboolean dccs_send_proto( gpointer data, gint fd, b_input_condition cond )
dcc_file_transfer_t *df = data;
file_transfer_t *file = df->ft;
- if( ( cond & GAIM_INPUT_READ ) &&
+ if( ( cond & B_EV_IO_READ ) &&
( file->status & FT_STATUS_LISTENING ) )
{
struct sockaddr *clt_addr;
@@ -247,12 +247,12 @@ gboolean dccs_send_proto( gpointer data, gint fd, b_input_condition cond )
file->accept( file );
/* reschedule for reading on new fd */
- df->watch_in = b_input_add( fd, GAIM_INPUT_READ, dccs_send_proto, df );
+ df->watch_in = b_input_add( fd, B_EV_IO_READ, dccs_send_proto, df );
return FALSE;
}
- if( cond & GAIM_INPUT_READ )
+ if( cond & B_EV_IO_READ )
{
int ret;
@@ -324,7 +324,7 @@ gboolean dccs_recv_start( file_transfer_t *ft )
ft->status = FT_STATUS_CONNECTING;
/* watch */
- df->watch_out = b_input_add( df->fd, GAIM_INPUT_WRITE, dccs_recv_proto, df );
+ df->watch_out = b_input_add( df->fd, B_EV_IO_WRITE, dccs_recv_proto, df );
ft->write_request = dccs_recv_write_request;
df->progress_timeout = b_timeout_add( DCC_MAX_STALL * 1000, dcc_progress, df );
@@ -337,18 +337,18 @@ gboolean dccs_recv_proto( gpointer data, gint fd, b_input_condition cond )
dcc_file_transfer_t *df = data;
file_transfer_t *ft = df->ft;
- if( ( cond & GAIM_INPUT_WRITE ) &&
+ if( ( cond & B_EV_IO_WRITE ) &&
( ft->status & FT_STATUS_CONNECTING ) )
{
ft->status = FT_STATUS_TRANSFERRING;
- //df->watch_in = b_input_add( df->fd, GAIM_INPUT_READ, dccs_recv_proto, df );
+ //df->watch_in = b_input_add( df->fd, B_EV_IO_READ, dccs_recv_proto, df );
df->watch_out = 0;
return FALSE;
}
- if( cond & GAIM_INPUT_READ )
+ if( cond & B_EV_IO_READ )
{
int ret, done;
@@ -405,7 +405,7 @@ gboolean dccs_recv_write_request( file_transfer_t *ft )
if( df->watch_in )
return dcc_abort( df, "BUG: write_request() called while watching" );
- df->watch_in = b_input_add( df->fd, GAIM_INPUT_READ, dccs_recv_proto, df );
+ df->watch_in = b_input_add( df->fd, B_EV_IO_READ, dccs_recv_proto, df );
return TRUE;
}
@@ -448,7 +448,7 @@ gboolean dccs_send_write( file_transfer_t *file, char *data, unsigned int data_l
df->bytes_sent += ret;
if( df->bytes_sent < df->ft->file_size )
- df->watch_out = b_input_add( df->fd, GAIM_INPUT_WRITE, dccs_send_can_write, df );
+ df->watch_out = b_input_add( df->fd, B_EV_IO_WRITE, dccs_send_can_write, df );
return TRUE;
}
@@ -564,4 +564,3 @@ file_transfer_t *dcc_request( struct im_connection *ic, char* const* ctcp )
return NULL;
}
-