Mercurial > pidgin
changeset 13107:d65fa65eac02
[gaim-migrate @ 15469]
I "inadvertently" caused file transfers to not finish in the core - this fixes it.
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Fri, 03 Feb 2006 01:23:46 +0000 |
parents | a0a4b44239e8 |
children | 8695e933ad64 |
files | src/ft.c |
diffstat | 1 files changed, 13 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ft.c Thu Feb 02 21:34:43 2006 +0000 +++ b/src/ft.c Fri Feb 03 01:23:46 2006 +0000 @@ -855,20 +855,23 @@ } } - if (gaim_xfer_get_size(xfer) > 0) - xfer->bytes_remaining -= r; + if (r > 0) { + if (gaim_xfer_get_size(xfer) > 0) + xfer->bytes_remaining -= r; - xfer->bytes_sent += r; + xfer->bytes_sent += r; + + if (xfer->ops.ack != NULL) + xfer->ops.ack(xfer, buffer, r); - if (xfer->ops.ack != NULL) - xfer->ops.ack(xfer, buffer, r); + g_free(buffer); - g_free(buffer); + ui_ops = gaim_xfer_get_ui_ops(xfer); - ui_ops = gaim_xfer_get_ui_ops(xfer); - - if (ui_ops != NULL && ui_ops->update_progress != NULL) - ui_ops->update_progress(xfer, gaim_xfer_get_progress(xfer)); + if (ui_ops != NULL && ui_ops->update_progress != NULL) + ui_ops->update_progress(xfer, + gaim_xfer_get_progress(xfer)); + } if (gaim_xfer_is_completed(xfer)) gaim_xfer_end(xfer);