Ignore:
Timestamp:
Apr 22, 2010, 1:49:16 AM (12 years ago)
Author:
charles
Message:

(trunk libT) #3162 "allow optional end-user configuration of TCP_CONGESTION" -- add jch's implementation of this to trunk for 2.00

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/session.c

    r10485 r10508  
    323323    tr_bencDictAddInt ( d, TR_PREFS_KEY_PEER_PORT_RANDOM_HIGH,    s->randomPortHigh );
    324324    tr_bencDictAddInt ( d, TR_PREFS_KEY_PEER_SOCKET_TOS,          s->peerSocketTOS );
     325    if(s->peer_congestion_algorithm && s->peer_congestion_algorithm[0])
     326        tr_bencDictAddStr ( d, TR_PREFS_KEY_PEER_CONGESTION_ALGORITHM, s->peer_congestion_algorithm );
    325327    tr_bencDictAddBool( d, TR_PREFS_KEY_PEX_ENABLED,              s->isPexEnabled );
    326328    tr_bencDictAddBool( d, TR_PREFS_KEY_PORT_FORWARDING,          tr_sessionIsPortForwardingEnabled( s ) );
     
    669671    if( tr_bencDictFindInt( settings, TR_PREFS_KEY_PEER_SOCKET_TOS, &i ) )
    670672        session->peerSocketTOS = i;
     673    if( tr_bencDictFindStr( settings, TR_PREFS_KEY_PEER_CONGESTION_ALGORITHM, &str ) )
     674        session->peer_congestion_algorithm = tr_strdup(str);
    671675    if( tr_bencDictFindBool( settings, TR_PREFS_KEY_BLOCKLIST_ENABLED, &boolVal ) )
    672676        tr_blocklistSetEnabled( session, boolVal );
     
    16571661    tr_free( session->proxyUsername );
    16581662    tr_free( session->proxyPassword );
     1663    tr_free( session->peer_congestion_algorithm );
    16591664    tr_free( session );
    16601665}
Note: See TracChangeset for help on using the changeset viewer.