Mercurial > pidgin
comparison 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 |
comparison
equal
deleted
inserted
replaced
4674:7ffe2b64de2d | 4675:3145c5c45877 |
---|---|
1266 g_free(data); | 1266 g_free(data); |
1267 xfer->data = NULL; | 1267 xfer->data = NULL; |
1268 } | 1268 } |
1269 | 1269 |
1270 static void | 1270 static void |
1271 irc_xfer_cancel(struct gaim_xfer *xfer) | 1271 irc_xfer_cancel_send(struct gaim_xfer *xfer) |
1272 { | |
1273 struct irc_xfer_data *data = (struct irc_xfer_data *)xfer->data; | |
1274 | |
1275 data->idata->file_transfers = g_slist_remove(data->idata->file_transfers, | |
1276 xfer); | |
1277 | |
1278 g_free(data); | |
1279 xfer->data = NULL; | |
1280 } | |
1281 | |
1282 static void | |
1283 irc_xfer_cancel_recv(struct gaim_xfer *xfer) | |
1272 { | 1284 { |
1273 struct irc_xfer_data *data = (struct irc_xfer_data *)xfer->data; | 1285 struct irc_xfer_data *data = (struct irc_xfer_data *)xfer->data; |
1274 | 1286 |
1275 data->idata->file_transfers = g_slist_remove(data->idata->file_transfers, | 1287 data->idata->file_transfers = g_slist_remove(data->idata->file_transfers, |
1276 xfer); | 1288 xfer); |
1375 gaim_xfer_set_size(xfer, size); | 1387 gaim_xfer_set_size(xfer, size); |
1376 | 1388 |
1377 g_free(filename); | 1389 g_free(filename); |
1378 | 1390 |
1379 /* Setup our I/O op functions. */ | 1391 /* Setup our I/O op functions. */ |
1380 gaim_xfer_set_init_fnc(xfer, irc_xfer_init); | 1392 gaim_xfer_set_init_fnc(xfer, irc_xfer_init); |
1381 gaim_xfer_set_end_fnc(xfer, irc_xfer_end); | 1393 gaim_xfer_set_end_fnc(xfer, irc_xfer_end); |
1382 gaim_xfer_set_cancel_fnc(xfer, irc_xfer_cancel); | 1394 gaim_xfer_set_cancel_send_fnc(xfer, irc_xfer_cancel_send); |
1383 gaim_xfer_set_ack_fnc(xfer, irc_xfer_ack); | 1395 gaim_xfer_set_cancel_recv_fnc(xfer, irc_xfer_cancel_recv); |
1396 gaim_xfer_set_ack_fnc(xfer, irc_xfer_ack); | |
1384 | 1397 |
1385 /* Keep track of this transfer for later. */ | 1398 /* Keep track of this transfer for later. */ |
1386 id->file_transfers = g_slist_append(id->file_transfers, xfer); | 1399 id->file_transfers = g_slist_append(id->file_transfers, xfer); |
1387 | 1400 |
1388 /* Now perform the request! */ | 1401 /* Now perform the request! */ |