Opened 11 years ago

Closed 9 years ago

Last modified 9 years ago

#4201 closed Bug (fixed)

Automatic limit can't be stopped

Reported by: aonez Owned by:
Priority: Normal Milestone: 2.70
Component: Transmission Version: 2.22
Severity: Normal Keywords: automatic limit manual stop, patch needed


I will explain that bug with an example:

  1. I've made an automatic rule for the speed limit, from 8:00 AM to 0:00 AM the speed is limited, since 0:00 AM the speed will be unlimited.
  2. If I'm working at 0:00 AM with Transmission opened, the rule goes on as it is programmed to.
  3. If I try to set the limit again (light the turtle), It goes on again, and again, and again. Only at 0:01 AM I can stop it.

Maybe a simple boolean called BOOL automaticLimitManuallyCancelled will do the trick. I can help in the development if needed.

Attachments (1)

turtle.diff (3.5 KB) - added by dim-an 9 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 Changed 11 years ago by livings124

I confirm the bug where you can't toggle the limit on the same minute as where it auto-toggles. A patch would be really appreciated. Desired behavior is the limit is auto-toggled on the limit and launch, but otherwise manual toggling of the limit are not automatically changed.

comment:2 Changed 10 years ago by aonez

I just can't find where is the time handler in the code, I've only seen how to control the turtle button and growl messages, in the Controller.m.

Any help? Where to find the time check to the auto limit?

comment:3 Changed 10 years ago by jordan

The code is in libtransmission/session.c, in the functions testTurtleTime(), turtleCheckClock(), turtleBootstrap(), turtleUpdateTable(), and so on.

comment:4 Changed 10 years ago by jordan

aonez, any news?

comment:5 Changed 10 years ago by aonez

I just need some free time to understand the functions and make a patch. Will post some better news soon. Thanks for pointing the session.c Jordan :)

comment:6 Changed 10 years ago by jordan

aonez: ping

comment:7 Changed 10 years ago by jordan

aonez: ping

comment:8 Changed 10 years ago by x190

  • Keywords patch needed added

Changed 9 years ago by dim-an

comment:9 Changed 9 years ago by dim-an

Hey, please check the enclosed patch. It should solve the issue.

comment:10 Changed 9 years ago by dim-an

btw, looks like this patch solves #4309 as well

comment:11 Changed 9 years ago by livings124

Works good. Thanks! r13499

comment:12 Changed 9 years ago by livings124

  • Milestone changed from None Set to 2.70
  • Resolution set to fixed
  • Status changed from new to closed

comment:13 Changed 9 years ago by livings124

I've come up with an obscure edge case that might or might not be worth fixing:

  • I have the schedule set to be on from 12pm to 12am.
  • At 12pm it auto turns on.
  • I manually turn off the turtle mode (scheduler is still set).
  • I sleep the computer, and then wake it up 24 hrs later.

In this case, I would expect it to auto turn on, since even though I manually toggled, it's in a new range of the schedule. Since it checks if its in a new range based on if the last was the opposite of the current expected state, it won't turn on even though it should.

It's a more obscure case, but maybe worth looking into in the future.

comment:14 Changed 9 years ago by dim-an

You are right, such situation is possible.

If we want to work properly in this situation, we can introduce variable that will store 'last time we switched turtle mode automatically'. I believe that using it will help us to properly handle this case.

I'll try to look into it during the next few days.

comment:15 Changed 9 years ago by livings124

Created #5043 to cover the edge case.

Note: See TracTickets for help on using tickets.