Opened 9 years ago

Closed 6 years ago

#3586 closed defect (fixed)

File transfers are never canceled for real

Reported by: Edtech Owned by: asterix
Priority: high Milestone: 0.14
Component: usability Version: hg
Severity: critical Keywords:
Cc: Blocked By:
Blocking: OS: All

Description

If you cancel a transfert, the file is not released and do not can be removed as long as Gajim was not closed.

Change History (9)

comment:1 Changed 9 years ago by steve-e

  • Milestone changed from 0.11.4 to 0.12
  • Version changed from 0.11.3 to 0.11.4

comment:2 Changed 8 years ago by js

  • Owner changed from asterix to js

comment:3 Changed 8 years ago by js

  • OS changed from Windows to All
  • Owner changed from js to asterix
  • Priority changed from normal to high
  • Summary changed from Cancel a transfer blocks the deletion of the downloaded file to File transfers are never canceled for real
  • Version changed from 0.11.4 to svn

I had a look at this, Asterix. It's not a Windows bug, it's a deeper bug - Windows just showed it because it can't delete opened files.

Gajim never closes the file handle when you cancel a transfer. In fact, it doesn't even cancel it properly. That explains why someone sometimes got a file that I already canceled. Everything that Gajim does it remove it from the FT window and send a rejection stanza, nothing more.

If you cancel the file before the other side accepts, the other side is still able to get the whole file. What we do is: We send a rejection and rely on the other side to close the stream. But that never closes our file handle. And if the other side doesn't close, we still transfer.

We need to rewrite cancelling file transfers, as this doesn't work at all.

I had a look at it, but I think the whole file transfer code is a bit strange - GUI and actual file transfer code is happily mixed. Could you maybe fix this, Asterix? You can also see on Linux that the file (and the stream, if the other side doesn't close it!) is never ended using lsof.

comment:4 Changed 8 years ago by asterix

  • Milestone changed from 0.12 to 0.13

comment:5 Changed 8 years ago by js

  • Milestone changed from 0.13 to 0.12
  • Severity changed from normal to critical

Asterix, this is for 0.12 IMO, as this is a serious bug. It may leak private information, for example if you drop a file by accident in the chat window. Now you cancel it, but the other side still receives it - VERY, VERY bad. Already happened to me.

comment:6 Changed 8 years ago by asterix

  • Milestone changed from 0.12 to 0.13

this is in Gajim since ages, and nat many ppl complains. Ok it's bad, but it's hard to fix, and I don't want to release in 2 monthes. As currently all dev seems to be busy, I won't fix that for 0.12.

comment:7 Changed 7 years ago by asterix

  • Milestone 0.13 deleted

comment:8 Changed 7 years ago by cleese

please fix this :)

comment:9 Changed 6 years ago by Yann Leboulanger <asterix@…>

  • Milestone set to 0.14
  • Resolution set to fixed
  • Status changed from new to closed

(In [04270cbd7e04]) don't send a canceld filetransfer. Fixes #3586

Note: See TracTickets for help on using tickets.