Changeset 8393


Ignore:
Timestamp:
May 13, 2009, 7:58:04 PM (12 years ago)
Author:
charles
Message:

(trunk daemon) add --paused argument to pause all on startup

Location:
trunk/daemon
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/daemon.c

    r8242 r8393  
    3939#define PREF_KEY_DIR_WATCH_ENABLED  "watch-dir-enabled"
    4040
    41 
     41static tr_bool paused = FALSE;
    4242static tr_bool closing = FALSE;
    4343static tr_session * mySession = NULL;
     
    7777    { 'V', "version", "Show version number and exit", "V", 0, NULL },
    7878    { 'w', "download-dir", "Where to save downloaded data", "w", 1, "<path>" },
     79    { 800, "paused", "Pause all torrents on startup", NULL, 0, NULL },
    7980    { 'P', "peerport", "Port for incoming peers (Default: " TR_DEFAULT_PEER_PORT_STR ")", "P", 1, "<port>" },
    8081    { 'm', "portmap", "Enable portmapping via NAT-PMP or UPnP", "m", 0, NULL },
     
    274275            case 'l': tr_bencDictAddInt( &settings, TR_PREFS_KEY_PEER_LIMIT_TORRENT, atoi( optarg ) );
    275276                      break;
     277            case 800: paused = TRUE;
     278                      break;
    276279            case 910: tr_bencDictAddInt( &settings, TR_PREFS_KEY_ENCRYPTION, TR_ENCRYPTION_REQUIRED );
    277280                      break;
     
    334337    /* load the torrents */
    335338    {
     339        tr_torrent ** torrents;
    336340        tr_ctor * ctor = tr_ctorNew( mySession );
    337         tr_torrent ** torrents = tr_sessionLoadTorrents( mySession, ctor, NULL );
     341        if( paused )
     342            tr_ctorSetPaused( ctor, TR_FORCE, TRUE );
     343        torrents = tr_sessionLoadTorrents( mySession, ctor, NULL );
    338344        tr_free( torrents );
    339345        tr_ctorFree( ctor );
  • trunk/daemon/transmission-daemon.1

    r8242 r8393  
    8282Listen for RPC connections on a specific address. This must be an IPv4 address. Only one RPC listening address is allowed. Default: 0.0.0.0 (All addresses)
    8383
     84.It Fl -paused
     85Pause all torrents on startup
     86
    8487.It Fl L Fl -peerlimit-global Ar limit
    8588Overall peer limit. Useful on embedded systems where the default might be unsuitable. Default: 240
Note: See TracChangeset for help on using the changeset viewer.