Changeset 3243


Ignore:
Timestamp:
Oct 1, 2007, 12:08:12 AM (14 years ago)
Author:
charles
Message:

tweaks

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-mgr.c

    r3242 r3243  
    10851085    const Torrent * t = getExistingTorrent( (tr_peerMgr*)manager, torrentHash );
    10861086    int i, peerCount;
     1087    const int isLocked = torrentIsLocked( t );
    10871088    const tr_peer ** peers = (const tr_peer **) tr_ptrArrayPeek( t->peers, &peerCount );
    10881089    tr_pex * pex = tr_new( tr_pex, peerCount );
    10891090    tr_pex * walk = pex;
    10901091
    1091     managerLock( manager );
     1092    if( !isLocked )
     1093        torrentLock( (Torrent*)t );
    10921094
    10931095    t = getExistingTorrent( (tr_peerMgr*)manager, torrentHash );
     
    11121114    *setme_pex = pex;
    11131115
    1114     managerUnlock( manager );
     1116    if( !isLocked )
     1117        torrentUnlock( (Torrent*)t );
     1118
    11151119    return peerCount;
    11161120}
  • trunk/libtransmission/peer-msgs.c

    r3242 r3243  
    6969    KEEPALIVE_INTERVAL_SECS = 90,          /* idle seconds before we send a keepalive */
    7070    PEX_INTERVAL            = (60 * 1000), /* msec between calls to sendPex() */
    71     PEER_PULSE_INTERVAL     = (100),       /* msec between calls to pulse() */
     71    PEER_PULSE_INTERVAL     = (50) ,       /* msec between calls to pulse() */
    7272};
    7373
Note: See TracChangeset for help on using the changeset viewer.