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

tweaks

File:
1 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}
Note: See TracChangeset for help on using the changeset viewer.