Opened 12 years ago

Closed 12 years ago

#2957 closed Enhancement (invalid)

Generic option parser

Reported by: wereHamster Owned by:
Priority: Normal Milestone: None Set
Component: Daemon Version: 1.91
Severity: Normal Keywords: needinfo
Cc: tom@…


The daemon only exposes some options through the commandline. If the user wants to set any of the other options, he has to let the daemon generate the settings.json file, stop the daemon, edit the file manually and start the daemon again.

This patch allows the daemon to set any options through the commandline, given the user knows the name and type (string, number, boolean) of the option.

Attachments (1)

ticket-2957-generic-option-parser.patch (2.2 KB) - added by wereHamster 12 years ago.

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by wereHamster

comment:1 Changed 12 years ago by charles

On the one hand this patch seems innocent enough, but on the other hand I can't think of a decent use case for it. Could you give some specific examples of this option in use?

comment:2 Changed 12 years ago by charles

  • Keywords needinfo added

comment:3 Changed 12 years ago by wereHamster

This is one patch from a series that I made some time ago. Unfortunately I can't share the other patches, but this one seemed like it could be accepted.

The settings file contains many settings which are not exposed through the commandline switches. This patch tries to improve upon that by giving experienced users (= those who know the option names and valid values) a way to set those at startup.

comment:4 Changed 12 years ago by wereHamster

Ah, you want specific examples. Well, the one I had originally in mind when I wrote that patch I unfortunately can't share. But another one I am planing to implement is a switch to disable the session id protection in the rpc server (in cases where it is not needed and causes unnecessary roundtrips between the server and client). I don't know how you feel about it, but I think it would be a bad idea to expose this option on the commandline (users are stupid after all...),

Other use-cases include setting peer-socket-tos, proxy-*, umask, preallocation etc.

comment:5 Changed 12 years ago by charles

  • Resolution set to invalid
  • Status changed from new to closed

I think it would be a bad idea to expose a session id protection toggle at all. :(

If these other items are useful for accessing via a remote control, they should be added to the RPC interface -- such as umask and preallocation being in session-get and session-set. Doing it the way proposed in this ticket is more like a hack that reveals some of Transmission's internals into the RPC interface.

Note: See TracTickets for help on using tickets.