Ignore:
Timestamp:
Jan 30, 2009, 12:41:08 AM (13 years ago)
Author:
charles
Message:

(trunk libT) more assertions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.h

    r7710 r7816  
    134134    struct tr_ratecontrol    swarmSpeed;
    135135
     136    int                      magicNumber;
     137
    136138    int                      error;
    137139    char                     errorString[128];
     
    278280}
    279281
     282/***
     283****
     284***/
     285
     286enum
     287{
     288    TORRENT_MAGIC_NUMBER = 95549
     289};
     290
     291static inline tr_bool tr_isTorrent( const tr_torrent * tor )
     292{
     293    return ( tor != NULL )
     294        && ( tor->magicNumber == TORRENT_MAGIC_NUMBER )
     295        && ( tr_isSession( tor->session ) );
     296}
     297
    280298#endif
Note: See TracChangeset for help on using the changeset viewer.