Ignore:
Timestamp:
Jan 18, 2011, 10:51:29 PM (11 years ago)
Author:
jordan
Message:

code cleanup for tr_peerMgrTorrentAvailability().

  1. move responsibility for getting a thread lock back to the public API fucntion, tr_torrentAvailability().
  2. if the torrent doesn't have metadata, stop after zeroing out the table
  3. minor code formatting cleanup
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r11696 r11704  
    14381438
    14391439void
    1440 tr_torrentAvailability( const tr_torrent * tor,
    1441                         int8_t *           tab,
    1442                         int                size )
    1443 {
     1440tr_torrentAvailability( const tr_torrent * tor, int8_t * tab, int size )
     1441{
     1442    assert( tr_isTorrent( tor ) );
     1443    assert( tab != NULL );
     1444    assert( size > 0 );
     1445
     1446    tr_torrentLock( tor );
     1447
    14441448    tr_peerMgrTorrentAvailability( tor, tab, size );
     1449
     1450    tr_torrentUnlock( tor );
    14451451}
    14461452
Note: See TracChangeset for help on using the changeset viewer.