Changeset 7431


Ignore:
Timestamp:
Dec 17, 2008, 3:38:02 AM (12 years ago)
Author:
charles
Message:

(trunk libT) fix assertion error reported by Rolcol earlier today in #transmission

File:
1 edited

Legend:

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

    r7423 r7431  
    13491349                  const tr_pex *  pex )
    13501350{
    1351     Torrent * t;
    1352     managerLock( manager );
    1353 
    1354     assert( tr_isPex( pex ) );
    1355 
    1356     t = getExistingTorrent( manager, torrentHash );
    1357     if( !tr_sessionIsAddressBlocked( t->manager->session, &pex->addr ) )
    1358         ensureAtomExists( t, &pex->addr, pex->port, pex->flags, from );
     1351    if( tr_isPex( pex ) ) /* safeguard against corrupt data */
     1352    {
     1353        Torrent * t;
     1354        managerLock( manager );
     1355
     1356
     1357        t = getExistingTorrent( manager, torrentHash );
     1358        if( !tr_sessionIsAddressBlocked( t->manager->session, &pex->addr ) )
     1359            ensureAtomExists( t, &pex->addr, pex->port, pex->flags, from );
    13591360   
    1360     managerUnlock( manager );
     1361        managerUnlock( manager );
     1362    }
    13611363}
    13621364
Note: See TracChangeset for help on using the changeset viewer.