]> granicus.if.org Git - transmission/commitdiff
(trunk) second half of r9927.... :/
authorCharles Kerr <charles@transmissionbt.com>
Wed, 13 Jan 2010 22:46:22 +0000 (22:46 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Wed, 13 Jan 2010 22:46:22 +0000 (22:46 +0000)
doc/rpc-spec.txt
libtransmission/announcer.c
libtransmission/rpcimpl.c
libtransmission/transmission.h

index 7ba4ed4a8e9c0eb227d38f2dc81620cde2768fd0..489ab4df91a6143122a0452c9d235cae35bafa5e 100644 (file)
                       | hasAnnounced            | boolean    | tr_tracker_stat
                       | hasScraped              | boolean    | tr_tracker_stat
                       | host                    | string     | tr_tracker_stat
+                      | id                      | number     | tr_tracker_stat
                       | isBackup                | boolean    | tr_tracker_stat
                       | lastAnnouncePeerCount   | number     | tr_tracker_stat
                       | lastAnnounceResult      | number     | tr_tracker_stat
index 95a7fd5e123bd5f274fffa2e0b967f3251933353..5c5218abdff6fd27eab9dfc72e8df2609e3b6448 100644 (file)
@@ -296,7 +296,7 @@ typedef struct
     int downloadCount;
     int downloaderCount;
     
-    uint32_t identifier;
+    uint32_t id;
 
     /* sent as the "key" argument in tracker requests
      * to verify us if our IP address changes.
@@ -322,13 +322,13 @@ static tr_tracker_item*
 trackerNew( tr_announcer  * announcer,
             const char    * announce,
             const char    * scrape,
-            uint32_t      identifier )
+            uint32_t        id )
 {
     tr_tracker_item * tracker = tr_new0( tr_tracker_item, 1  );
     tracker->host = getHost( announcer, announce );
     tracker->announce = tr_strdup( announce );
     tracker->scrape = tr_strdup( scrape );
-    tracker->identifier = identifier;
+    tracker->id = id;
     generateKeyParam( tracker->key_param, KEYLEN );
     tracker->seederCount = -1;
     tracker->leecherCount = -1;
@@ -453,9 +453,9 @@ tierAddTracker( tr_announcer * announcer,
                 tr_tier      * tier,
                 const char   * announce,
                 const char   * scrape,
-                uint32_t     identifier )
+                uint32_t       id )
 {
-    tr_tracker_item * tracker = trackerNew( announcer, announce, scrape, identifier );
+    tr_tracker_item * tracker = trackerNew( announcer, announce, scrape, id );
 
     tr_ptrArrayAppend( &tier->trackers, tracker );
     dbgmsg( tier, "adding tracker %s", announce );
@@ -1754,7 +1754,7 @@ tr_announcerStats( const tr_torrent * torrent,
             const tr_tracker_item * tracker = tr_ptrArrayNth( (tr_ptrArray*)&tier->trackers, j );
             tr_tracker_stat * st = ret + out++;
 
-            st->identifier = tracker->identifier;
+            st->id = tracker->id;
             tr_strlcpy( st->host, tracker->host->name, sizeof( st->host ) );
             tr_strlcpy( st->announce, tracker->announce, sizeof( st->announce ) );
             st->tier = i + 1;
index a2dd1190bcec4f4a4375085ff2beeef02967f4ac..5362092181e3f0e84ef1a82a50a72e32f781167b 100644 (file)
@@ -382,7 +382,7 @@ addTrackerStats( const tr_tracker_stat * st, int n, tr_benc * list )
         tr_bencDictAddBool( d, "hasAnnounced", s->hasAnnounced );
         tr_bencDictAddBool( d, "hasScraped", s->hasScraped );
         tr_bencDictAddStr ( d, "host", s->host );
-        tr_bencDictAddInt ( d, "identifier", s->identifier );
+        tr_bencDictAddInt ( d, "id", s->id );
         tr_bencDictAddBool( d, "isBackup", s->isBackup );
         tr_bencDictAddInt ( d, "lastAnnouncePeerCount", s->lastAnnouncePeerCount );
         tr_bencDictAddStr ( d, "lastAnnounceResult", s->lastAnnounceResult );
index 709d3e41f04d6ecab81db5905fbfe6d5785290b9..df6059dc66c4f45f17b502a5f6324b4941291127 100644 (file)
@@ -1462,7 +1462,7 @@ typedef struct
     int tier;
     
     /* used to match to a tr_tracker_info */
-    uint32_t identifier;
+    uint32_t id;
 }
 tr_tracker_stat;