Changeset 7393


Ignore:
Timestamp:
Dec 14, 2008, 10:57:08 PM (10 years ago)
Author:
charles
Message:

(trunk) fix gtk bug of not remembering users' settings for per-torrent peer limits

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/tr-core.c

    r7390 r7393  
    589589        tr_sessionSetPeerLimit( tr_core_session( core ), val );
    590590    }
     591    else if( !strcmp( key, TR_PREFS_KEY_PEER_LIMIT_TORRENT ) )
     592    {
     593        const uint16_t val = pref_int_get( key );
     594        tr_sessionSetPeerLimitPerTorrent( tr_core_session( core ), val );
     595    }
    591596    else if( !strcmp( key, PREF_KEY_INHIBIT_HIBERNATION ) )
    592597    {
  • trunk/libtransmission/session.c

    r7385 r7393  
    711711}
    712712
     713void
     714tr_sessionSetPeerLimitPerTorrent( tr_session  * session, uint16_t n )
     715{
     716    session->peerLimitPerTorrent = n;
     717}
     718
     719uint16_t
     720tr_sessionGetPeerLimitPerTorrent( const tr_session * session )
     721{
     722    return session->peerLimitPerTorrent;
     723}
     724
    713725/***
    714726****
  • trunk/libtransmission/transmission.h

    r7371 r7393  
    539539uint16_t   tr_sessionGetPeerLimit( const tr_session * session );
    540540
     541void       tr_sessionSetPeerLimitPerTorrent( tr_session  * session,
     542                                             uint16_t      maxGlobalPeers );
     543
     544uint16_t   tr_sessionGetPeerLimitPerTorrent( const tr_session * session );
     545
    541546
    542547/**
Note: See TracChangeset for help on using the changeset viewer.