Mercurial > pidgin.yaz
diff src/protocols/irc/irc.c @ 4675:3145c5c45877
[gaim-migrate @ 4986]
Okay, redid the cancel stuff. It may not work too well yet, as it's largely
untested, and will need some testing and bug reporting. The protocols may
not work too well (namely, Oscar), but this will be fixed soon. Note that
that's only for canceling. Any receiving that currently works will continue
to work.
committer: Tailor Script <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Sat, 08 Mar 2003 08:27:02 +0000 |
| parents | d19872836812 |
| children | 283fb289c510 |
line wrap: on
line diff
--- a/src/protocols/irc/irc.c Sat Mar 08 07:21:09 2003 +0000 +++ b/src/protocols/irc/irc.c Sat Mar 08 08:27:02 2003 +0000 @@ -1268,7 +1268,19 @@ } static void -irc_xfer_cancel(struct gaim_xfer *xfer) +irc_xfer_cancel_send(struct gaim_xfer *xfer) +{ + struct irc_xfer_data *data = (struct irc_xfer_data *)xfer->data; + + data->idata->file_transfers = g_slist_remove(data->idata->file_transfers, + xfer); + + g_free(data); + xfer->data = NULL; +} + +static void +irc_xfer_cancel_recv(struct gaim_xfer *xfer) { struct irc_xfer_data *data = (struct irc_xfer_data *)xfer->data; @@ -1377,10 +1389,11 @@ g_free(filename); /* Setup our I/O op functions. */ - gaim_xfer_set_init_fnc(xfer, irc_xfer_init); - gaim_xfer_set_end_fnc(xfer, irc_xfer_end); - gaim_xfer_set_cancel_fnc(xfer, irc_xfer_cancel); - gaim_xfer_set_ack_fnc(xfer, irc_xfer_ack); + gaim_xfer_set_init_fnc(xfer, irc_xfer_init); + gaim_xfer_set_end_fnc(xfer, irc_xfer_end); + gaim_xfer_set_cancel_send_fnc(xfer, irc_xfer_cancel_send); + gaim_xfer_set_cancel_recv_fnc(xfer, irc_xfer_cancel_recv); + gaim_xfer_set_ack_fnc(xfer, irc_xfer_ack); /* Keep track of this transfer for later. */ id->file_transfers = g_slist_append(id->file_transfers, xfer);
