(trunk) copy-by-value changes to tr_tracker_stat

This commit is contained in:
Charles Kerr
2009-09-26 03:36:58 +00:00
parent 5b46b63b23
commit 28e119c1bb
4 changed files with 10 additions and 9 deletions

View File

@@ -374,7 +374,8 @@ 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, 23 );
tr_benc * d = tr_bencListAddDict( list, 24 );
tr_bencDictAddStr ( d, "announce", s->announce );
tr_bencDictAddInt ( d, "downloadCount", s->downloadCount );
tr_bencDictAddBool( d, "hasAnnounced", s->hasAnnounced );
tr_bencDictAddBool( d, "hasScraped", s->hasScraped );
@@ -653,8 +654,6 @@ torrentGet( tr_session * session,
else for( i = 0; i < torrentCount; ++i )
addInfo( torrents[i], tr_bencListAdd( list ), fields );
fprintf( stderr, "%s\n", tr_bencToStr( args_out, TR_FMT_JSON, NULL ) );
tr_free( torrents );
return msg;
}