Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#2520 closed Bug (fixed)

tor->isRunning not always saved to .resume file

Reported by: dairiki Owned by: charles
Priority: Low Milestone: 1.77
Component: libtransmission Version: 1.75
Severity: Normal Keywords:
Cc:

Description

When a torrent is stopped (via tr_torrentStop()) the dirty flag (tor->isDirty) does not get set. This means that the paused flag in the .resume file for the torrent will still be clear. If transmission is stopped and restarted, the torrent will resume to a running state (it should remain stopped.)

A (very small) patch is attached.

I've only tested this with transmission-daemon, but from looking at the code, I'd guess its a more general libtransmission problem.


Recipe to reproduce bug

Have transmission-daemon running and seeding a torrent.

(Look at the .resume file for the torrent and verify that paused is set to 0.)

Use transmission-remote to stop the torrent.

At this point you can either shut down transmission-daemon, or wait two minutes for its dirty-resume-save timer to time out. Then check the .resume file for the torrent. Note that paused is till set to 0. (Since the torrent is paused, it should be set to 1.)

(If, after stopping the torrent (with transmission-remote) one then alters some other property of the torrent (say the torrents seedratio), the .resume file will be marked dirty, and (after two minutes or shutting down the daemon) paused will be correctly set to 1 in the .resume file.)

Attachments (1)

resume-stopped.patch (429 bytes) - added by dairiki 12 years ago.
Patch on svn r9339

Download all attachments as: .zip

Change History (7)

Changed 12 years ago by dairiki

Patch on svn r9339

comment:1 Changed 12 years ago by charles

  • Milestone changed from None Set to 1.80
  • Status changed from new to assigned
  • Version changed from 1.75+ to 1.75

comment:2 Changed 12 years ago by charles

  • Keywords backport added
  • Resolution set to fixed
  • Status changed from assigned to closed

Thanks for the patch!

Added to trunk in r9340 for 1.80

comment:3 Changed 12 years ago by dairiki

Cool! Thanks for the quick application. (And thanks for transmission in general!)

comment:4 Changed 12 years ago by charles

  • Keywords backport-1.7x added; backport removed

comment:5 Changed 12 years ago by charles

backported to 1.7x branch in r9871

comment:6 Changed 12 years ago by charles

  • Keywords backport-1.7x removed
  • Milestone changed from 1.80 to 1.77
Note: See TracTickets for help on using tickets.