add rpc fields for the tracker identifier stats

This commit is contained in:
Mitchell Livingston 2010-01-10 04:23:09 +00:00
parent 0f19dbd600
commit d81389da50
2 changed files with 4 additions and 4 deletions

View File

@ -271,7 +271,6 @@ getannounce( tr_info * inf, tr_benc * meta )
int n;
int i, j, validTiers;
const int numTiers = tr_bencListSize( tiers );
uint32_t trackerId = 0;
n = 0;
for( i = 0; i < numTiers; ++i )

View File

@ -359,11 +359,11 @@ addTrackers( const tr_info * info,
for( i = 0; i < info->trackerCount; ++i )
{
const tr_tracker_info * t = &info->trackers[i];
tr_benc * d = tr_bencListAddDict( trackers, 3 );
tr_benc * d = tr_bencListAddDict( trackers, 4 );
tr_bencDictAddStr( d, "announce", t->announce );
tr_bencDictAddInt( d, "identifier", t->identifier );
tr_bencDictAddStr( d, "scrape", t->scrape );
tr_bencDictAddInt( d, "tier", t->tier );
tr_bencDictAddInt( d, "id", t->identifier );
}
}
@ -375,13 +375,14 @@ addTrackerStats( const tr_tracker_stat * st, int n, tr_benc * list )
for( i=0; i<n; ++i )
{
const tr_tracker_stat * s = &st[i];
tr_benc * d = tr_bencListAddDict( list, 22 );
tr_benc * d = tr_bencListAddDict( list, 23 );
tr_bencDictAddStr ( d, "announce", s->announce );
tr_bencDictAddInt ( d, "announceState", s->announceState );
tr_bencDictAddInt ( d, "downloadCount", s->downloadCount );
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_bencDictAddBool( d, "isBackup", s->isBackup );
tr_bencDictAddInt ( d, "lastAnnouncePeerCount", s->lastAnnouncePeerCount );
tr_bencDictAddStr ( d, "lastAnnounceResult", s->lastAnnounceResult );