Mercurial > pidgin.yaz
comparison libpurple/protocols/oscar/oft.c @ 30093:c726b1461159
A revision to my previous commit.
Only set the xfer to completed if it isn't already completed. To avoid
showing duplicate "File transferred successfully" messages
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 06 Apr 2010 09:26:30 +0000 |
parents | 1d657e98667b |
children | 0869bfe2738f 1cdae196aac8 |
comparison
equal
deleted
inserted
replaced
30092:1d657e98667b | 30093:c726b1461159 |
---|---|
501 * sent all bytes to the other user. But this function can be called | 501 * sent all bytes to the other user. But this function can be called |
502 * even if we haven't sent all bytes to the other user (in the case | 502 * even if we haven't sent all bytes to the other user (in the case |
503 * where the user already has this file on their computer and the | 503 * where the user already has this file on their computer and the |
504 * checksum matches). | 504 * checksum matches). |
505 */ | 505 */ |
506 purple_xfer_set_completed(conn->xfer, TRUE); | 506 if (!purple_xfer_is_completed(conn->xfer)) |
507 purple_xfer_set_completed(conn->xfer, TRUE); | |
507 | 508 |
508 purple_input_remove(conn->watcher_incoming); | 509 purple_input_remove(conn->watcher_incoming); |
509 conn->watcher_incoming = 0; | 510 conn->watcher_incoming = 0; |
510 conn->xfer->fd = conn->fd; | 511 conn->xfer->fd = conn->fd; |
511 conn->fd = -1; | 512 conn->fd = -1; |