Make the peer-congestion-algorithm preference visible.

When I first implemented this code, I made the preference hidden --
unless you set it yourself, it will not appear in the sttings file.
Now that it's been documented and advertised, make it visible.
This commit is contained in:
Juliusz Chroboczek 2011-01-15 16:25:24 +00:00
parent 1a862315de
commit 8ea2c0daa1
1 changed files with 3 additions and 2 deletions

View File

@ -349,8 +349,7 @@ tr_sessionGetSettings( tr_session * s, struct tr_benc * d )
tr_bencDictAddInt ( d, TR_PREFS_KEY_PEER_PORT_RANDOM_LOW, s->randomPortLow );
tr_bencDictAddInt ( d, TR_PREFS_KEY_PEER_PORT_RANDOM_HIGH, s->randomPortHigh );
tr_bencDictAddInt ( d, TR_PREFS_KEY_PEER_SOCKET_TOS, s->peerSocketTOS );
if(s->peer_congestion_algorithm && s->peer_congestion_algorithm[0])
tr_bencDictAddStr ( d, TR_PREFS_KEY_PEER_CONGESTION_ALGORITHM, s->peer_congestion_algorithm );
tr_bencDictAddStr ( d, TR_PREFS_KEY_PEER_CONGESTION_ALGORITHM, s->peer_congestion_algorithm );
tr_bencDictAddBool( d, TR_PREFS_KEY_PEX_ENABLED, s->isPexEnabled );
tr_bencDictAddBool( d, TR_PREFS_KEY_PORT_FORWARDING, tr_sessionIsPortForwardingEnabled( s ) );
tr_bencDictAddInt ( d, TR_PREFS_KEY_PREALLOCATION, s->preallocationMode );
@ -723,6 +722,8 @@ sessionSetImpl( void * vdata )
session->peerSocketTOS = i;
if( tr_bencDictFindStr( settings, TR_PREFS_KEY_PEER_CONGESTION_ALGORITHM, &str ) )
session->peer_congestion_algorithm = tr_strdup(str);
else
session->peer_congestion_algorithm = tr_strdup("");
if( tr_bencDictFindBool( settings, TR_PREFS_KEY_BLOCKLIST_ENABLED, &boolVal ) )
tr_blocklistSetEnabled( session, boolVal );
if( tr_bencDictFindStr( settings, TR_PREFS_KEY_BLOCKLIST_URL, &str ) )