mirror of
https://github.com/transmission/transmission
synced 2024-12-25 09:13:06 +00:00
add to RPC info for peers from DHT and LTEP
This commit is contained in:
parent
de82e235af
commit
aac5e5cb61
2 changed files with 5 additions and 1 deletions
|
@ -229,7 +229,9 @@
|
||||||
peersFrom | an object containing: |
|
peersFrom | an object containing: |
|
||||||
+-------------------------+------------+
|
+-------------------------+------------+
|
||||||
| fromCache | number | tr_stat
|
| fromCache | number | tr_stat
|
||||||
|
| fromDht | number | tr_stat
|
||||||
| fromIncoming | number | tr_stat
|
| fromIncoming | number | tr_stat
|
||||||
|
| fromLtep | number | tr_stat
|
||||||
| fromPex | number | tr_stat
|
| fromPex | number | tr_stat
|
||||||
| fromTracker | number | tr_stat
|
| fromTracker | number | tr_stat
|
||||||
-------------------+--------------------------------------+
|
-------------------+--------------------------------------+
|
||||||
|
|
|
@ -521,10 +521,12 @@ addField( const tr_torrent * tor, tr_benc * d, const char * key )
|
||||||
tr_bencDictAddInt( d, key, st->peersConnected );
|
tr_bencDictAddInt( d, key, st->peersConnected );
|
||||||
else if( tr_streq( key, keylen, "peersFrom" ) )
|
else if( tr_streq( key, keylen, "peersFrom" ) )
|
||||||
{
|
{
|
||||||
tr_benc * tmp = tr_bencDictAddDict( d, key, 4 );
|
tr_benc * tmp = tr_bencDictAddDict( d, key, 6 );
|
||||||
const int * f = st->peersFrom;
|
const int * f = st->peersFrom;
|
||||||
tr_bencDictAddInt( tmp, "fromCache", f[TR_PEER_FROM_RESUME] );
|
tr_bencDictAddInt( tmp, "fromCache", f[TR_PEER_FROM_RESUME] );
|
||||||
|
tr_bencDictAddInt( tmp, "fromDht", f[TR_PEER_FROM_DHT] );
|
||||||
tr_bencDictAddInt( tmp, "fromIncoming", f[TR_PEER_FROM_INCOMING] );
|
tr_bencDictAddInt( tmp, "fromIncoming", f[TR_PEER_FROM_INCOMING] );
|
||||||
|
tr_bencDictAddInt( tmp, "fromLtep", f[TR_PEER_FROM_LTEP] );
|
||||||
tr_bencDictAddInt( tmp, "fromPex", f[TR_PEER_FROM_PEX] );
|
tr_bencDictAddInt( tmp, "fromPex", f[TR_PEER_FROM_PEX] );
|
||||||
tr_bencDictAddInt( tmp, "fromTracker", f[TR_PEER_FROM_TRACKER] );
|
tr_bencDictAddInt( tmp, "fromTracker", f[TR_PEER_FROM_TRACKER] );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue