Mercurial > pidgin
diff src/protocols/msn/slp.c @ 9226:7a00289f2ef1
[gaim-migrate @ 10022]
Some fixes from shx. The progress indicator for file transfers was being
reset to 0 after files have been sent, and files were being truncated to 0
bytes. Also, when the file was transfered, the status was being set to
"cancel." These are fixed now.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 06 Jun 2004 20:56:54 +0000 |
parents | ab6636c5a136 |
children | ac8790437abe |
line wrap: on
line diff
--- a/src/protocols/msn/slp.c Sun Jun 06 20:45:53 2004 +0000 +++ b/src/protocols/msn/slp.c Sun Jun 06 20:56:54 2004 +0000 @@ -131,8 +131,8 @@ xfer = slpcall->xfer; - xfer->bytes_sent = offset; - xfer->bytes_remaining = total_length - offset; + xfer->bytes_sent = (offset + len); + xfer->bytes_remaining = total_length - (offset + len); gaim_xfer_update_progress(xfer); } @@ -141,10 +141,13 @@ msn_xfer_finish_cb(MsnSlpCall *slpcall, const char *body, long long size) { - if (size < 0) - gaim_xfer_cancel_remote(slpcall->xfer); - else - gaim_xfer_set_completed(slpcall->xfer, TRUE); + if (gaim_xfer_get_status(slpcall->xfer) != GAIM_XFER_STATUS_DONE) + { + if (size < 0) + gaim_xfer_cancel_remote(slpcall->xfer); + else + gaim_xfer_set_completed(slpcall->xfer, TRUE); + } } /**************************************************************************