1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 16:52:39 +00:00

(trunk) second half of r9927.... :/

This commit is contained in:
Charles Kerr 2010-01-13 22:46:22 +00:00
parent a77770a51a
commit de82e235af
4 changed files with 9 additions and 8 deletions

View file

@ -258,6 +258,7 @@
| 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

View 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;

View 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 );

View 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;