Mercurial > pidgin
comparison libpurple/ft.c @ 31281:0e9b252f1769
propagate from branch 'im.pidgin.pidgin' (head b51a9f598d90ec0520c1d605d2335b29ed1ef64d)
to branch 'im.pidgin.pidgin.mxit' (head a6e78a0638ffbf99efaa856cb181db5e0cea3797)
author | andrew.victor@mxit.com |
---|---|
date | Tue, 23 Nov 2010 07:50:25 +0000 |
parents | a76cf8ecb0c5 |
children | a8cc50c2279f |
comparison
equal
deleted
inserted
replaced
31280:7c5a78a2cc0d | 31281:0e9b252f1769 |
---|---|
1485 { | 1485 { |
1486 PurpleXferUiOps *ui_ops; | 1486 PurpleXferUiOps *ui_ops; |
1487 char *msg = NULL; | 1487 char *msg = NULL; |
1488 | 1488 |
1489 g_return_if_fail(xfer != NULL); | 1489 g_return_if_fail(xfer != NULL); |
1490 | |
1491 /* TODO: We definitely want to close any open request dialogs associated | |
1492 with this transfer. However, in some cases the request dialog might | |
1493 own a reference on the xfer. This happens at least with the "%s wants | |
1494 to send you %s" dialog from purple_xfer_ask_recv(). In these cases | |
1495 the ref count will not be decremented when the request dialog is | |
1496 closed, so the ref count will never reach 0 and the xfer will never | |
1497 be freed. This is a memleak and should be fixed. It's not clear what | |
1498 the correct fix is. Probably requests should have a destroy function | |
1499 that is called when the request is destroyed. But also, ref counting | |
1500 xfer objects makes this code REALLY complicated. An alternate fix is | |
1501 to not ref count and instead just make sure the object still exists | |
1502 when we try to use it. */ | |
1503 purple_request_close_with_handle(xfer); | |
1490 | 1504 |
1491 purple_xfer_set_status(xfer, PURPLE_XFER_STATUS_CANCEL_LOCAL); | 1505 purple_xfer_set_status(xfer, PURPLE_XFER_STATUS_CANCEL_LOCAL); |
1492 xfer->end_time = time(NULL); | 1506 xfer->end_time = time(NULL); |
1493 | 1507 |
1494 if (purple_xfer_get_filename(xfer) != NULL) | 1508 if (purple_xfer_get_filename(xfer) != NULL) |