Mercurial > pidgin
diff libpurple/protocols/oscar/oft.c @ 29683:1d657e98667b
Set file transfers to "completed" if the other user tells us they've
received the file. Fixes a bug where we show the file transfer as
canceled by us in the event where we're sending them a file that they
already have.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 06 Apr 2010 08:18:47 +0000 |
parents | 6e1967b0f90b |
children | c726b1461159 |
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oft.c Sun Apr 04 04:31:54 2010 +0000 +++ b/libpurple/protocols/oscar/oft.c Tue Apr 06 08:18:47 2010 +0000 @@ -496,6 +496,15 @@ static void peer_oft_recv_frame_done(PeerConnection *conn, OftFrame *frame) { + /* + * The core ft code sets the xfer to completed automatically if we've + * sent all bytes to the other user. But this function can be called + * even if we haven't sent all bytes to the other user (in the case + * where the user already has this file on their computer and the + * checksum matches). + */ + purple_xfer_set_completed(conn->xfer, TRUE); + purple_input_remove(conn->watcher_incoming); conn->watcher_incoming = 0; conn->xfer->fd = conn->fd;