Ignore:
Timestamp:
Sep 14, 2010, 6:23:48 AM (12 years ago)
Author:
Longinus00
Message:

switch trackerRemove and trackerReplace rpc calls to use tracker id instead of announce urls as identifiers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/remote.c

    r11205 r11209  
    12771277        tr_bool hasScraped;
    12781278        const char * host;
     1279        int64_t id;
    12791280        tr_bool isBackup;
    12801281        int64_t lastAnnouncePeerCount;
     
    13011302            tr_bencDictFindBool( t, "hasScraped", &hasScraped ) &&
    13021303            tr_bencDictFindStr ( t, "host", &host ) &&
     1304            tr_bencDictFindInt ( t, "id", &id ) &&
    13031305            tr_bencDictFindBool( t, "isBackup", &isBackup ) &&
    13041306            tr_bencDictFindInt ( t, "announceState", &announceState ) &&
     
    13241326
    13251327            printf( "\n" );
    1326             printf( "  Tracker #%d: %s\n", (int)(i+1), host );
     1328            printf( "  Tracker %d: %s\n", (int)(id), host );
    13271329            if( isBackup )
    13281330                printf( "  Backup on tier #%d\n", (int)tier );
     
    20362038                case 712:
    20372039                    {
    2038                         tr_benc * trackers = tr_bencDictAddDict( args, "trackerRemove", 1 );
    2039                         tr_bencDictAddInt( trackers, "id", atoi(optarg) );
     2040                        tr_benc * trackers = tr_bencDictAddList( args, "trackerRemove", 1 );
     2041                        tr_bencListAddInt( trackers, atoi(optarg) );
    20402042                        break;
    20412043                    }
Note: See TracChangeset for help on using the changeset viewer.