Changeset 7858 for trunk/daemon/remote.c


Ignore:
Timestamp:
Feb 9, 2009, 7:36:29 PM (13 years ago)
Author:
charles
Message:

(trunk libT) #1392: changing per-torrent peer limits via transmission-remote

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/remote.c

    r7856 r7858  
    6868    { 911, "encryption-preferred", "Prefer encrypted peer connections", "ep", 0, NULL },
    6969    { 912, "encryption-tolerated", "Prefer unencrypted peer connections", "et", 0, NULL },
    70     { 'f', "files",                "List the current torrent's files", "f",  0, NULL },
     70    { 'f', "files",                "List the current torrent(s)' files", "f",  0, NULL },
    7171    { 'g', "get",                  "Mark files for download", "g",  1, "<files>" },
    7272    { 'G', "no-get",               "Mark files for not downloading", "G",  1, "<files>" },
    73     { 'i', "info",                 "Show details of the current torrent(s)", "i",  0, NULL },
     73    { 'i', "info",                 "Show the current torrent(s)' details", "i",  0, NULL },
     74    { 920, "session-info",         "Show the session's details", "si", 0, NULL },
    7475    { 'l', "list",                 "List all torrents", "l",  0, NULL },
    7576    { 'm', "portmap",              "Enable portmapping via NAT-PMP or UPnP", "m",  0, NULL },
     
    8182    { 902, "priority-low",         "Set the files' priorities as low", "pl", 1, "<files>" },
    8283    { 'r', "remove",               "Remove the current torrent(s)", "r",  0, NULL },
     84    { 930, "peers",                "Set the current torrent(s)' maximum number of peers each", "pr", 1, "<max>" },
     85    { 931, "global-peers",         "Set the global maximum number of peers", "gpr", 1, "<max>" },
    8386    { 'R', "remove-and-delete",    "Remove the current torrent(s) and delete local data", NULL, 0, NULL },
    84     { 920, "session",              "Print session information", NULL,  0, NULL },
    8587    { 's', "start",                "Start the current torrent(s)", "s",  0, NULL },
    8688    { 'S', "stop",                 "Stop the current torrent(s)", "S",  0, NULL },
     
    9395    { 'x', "pex",                  "Enable peer exchange (PEX)", "x",  0, NULL },
    9496    { 'X', "no-pex",               "Disable peer exchange (PEX)", "X",  0, NULL },
    95     { 'z', "peers",                "List the current torrent's peers", "z",  0, NULL },
     97    { 940, "peer-info",            "List the current torrent(s)' peers", "pi",  0, NULL },
    9698    {   0, NULL,                   NULL, NULL, 0, NULL }
    9799};
     
    468470                break;
    469471
    470             case 'z':
    471                 tr_bencDictAddStr( &top, "method", "torrent-get" );
    472                 tr_bencDictAddInt( &top, "tag", TAG_PEERS );
    473                 addIdArg( args, id );
    474                 fields = tr_bencDictAddList( args, "fields", 1 );
    475                 tr_bencListAddStr( fields, "peers" );
    476                 break;
    477 
    478472            case 900:
    479473                tr_bencDictAddStr( &top, "method", "torrent-set" );
     
    512506                tr_bencDictAddStr( &top, "method", "session-get" );
    513507                tr_bencDictAddInt( &top, "tag", TAG_SESSION );
     508                break;
     509
     510            case 930:
     511                tr_bencDictAddStr( &top, "method", "torrent-set" );
     512                addIdArg( args, id );
     513                tr_bencDictAddInt( args, "peer-limit", atoi(optarg) );
     514                break;
     515
     516            case 931:
     517                tr_bencDictAddStr( &top, "method", "session-set" );
     518                tr_bencDictAddInt( args, "peer-limit", atoi(optarg) );
     519                break;
     520
     521            case 940:
     522                tr_bencDictAddStr( &top, "method", "torrent-get" );
     523                tr_bencDictAddInt( &top, "tag", TAG_PEERS );
     524                addIdArg( args, id );
     525                fields = tr_bencDictAddList( args, "fields", 1 );
     526                tr_bencListAddStr( fields, "peers" );
    514527                break;
    515528
Note: See TracChangeset for help on using the changeset viewer.