Opened 12 years ago
Closed 12 years ago
#3186 closed Bug (fixed)
Transmission-remote and --no-downlimit/--no-uplimite
Reported by: | Infy | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Daemon | Version: | |
Severity: | Normal | Keywords: | daemon, no-downlimit, no-uplimit |
Cc: | Eugene.Yudin@… |
Description
Version: svn rev. 10624 and 1.93.
Platform:
Linux archserv 2.6.33-ARCH #1 SMP PREEMPT Mon Apr 26 20:00:20 CEST 2010 i686 Intel(R) Atom(TM) CPU D410 @ 1.66GHz GenuineIntel GNU/Linux
Description: Transmission-remote does not correctly handle parameters'--no-downlimit' and '--no-uplimit'. More specifically, the program does not react to them.
Code with bug ('/daemon/remote.c'):
switch( c ) { case 'd': if( targs ) { tr_bencDictAddInt( targs, "downloadLimit", numarg( optarg ) ); tr_bencDictAddBool( targs, "downloadLimited", TRUE ); } else { tr_bencDictAddInt( sargs, TR_PREFS_KEY_DSPEED, numarg( optarg ) ); tr_bencDictAddBool( sargs, TR_PREFS_KEY_DSPEED_ENABLED, TRUE ); } break; case 'D': if( targs ) tr_bencDictAddBool( targs, "downloadLimited", FALSE ); else tr_bencDictAddBool( sargs, TR_PREFS_KEY_DSPEED_ENABLED, TRUE ); break; case 'u': if( targs ) { tr_bencDictAddInt( targs, "uploadLimit", numarg( optarg ) ); tr_bencDictAddBool( targs, "uploadLimited", TRUE ); } else { tr_bencDictAddInt( sargs, TR_PREFS_KEY_USPEED, numarg( optarg ) ); tr_bencDictAddBool( sargs, TR_PREFS_KEY_USPEED_ENABLED, TRUE ); } break; case 'U': if( targs ) tr_bencDictAddBool( targs, "uploadLimited", FALSE ); else tr_bencDictAddBool( sargs, TR_PREFS_KEY_USPEED_ENABLED, TRUE ); break; case 930: if( targs ) tr_bencDictAddInt( targs, "peer-limit", atoi(optarg) ); else tr_bencDictAddInt( sargs, TR_PREFS_KEY_PEER_LIMIT_GLOBAL, atoi(optarg) ); break; default: assert( "unhandled value" && 0 ); break; }
In the case of branches for 'else' to 'd' and 'D' command was called:
tr_bencDictAddBool( sargs, TR_PREFS_KEY_DSPEED_ENABLED, TRUE );
Although, for the 'D' should be:
tr_bencDictAddBool( sargs, TR_PREFS_KEY_DSPEED_ENABLED, FALSE );
Same for 'u' and 'U'.
Sorry for my english.
Attachments (1)
Change History (2)
Changed 12 years ago by Infy
comment:1 Changed 12 years ago by charles
- Milestone None Set deleted
- Resolution set to fixed
- Status changed from new to closed
- Version 1.93 deleted
Thanks!
Note: See
TracTickets for help on using
tickets.
Small patch with fix