Changeset 7825


Ignore:
Timestamp:
Feb 4, 2009, 5:38:40 PM (12 years ago)
Author:
charles
Message:

(trunk libT) hack on the r7824 crasher reported by Biiaru and m1b. This probably won't fix it but it should crash in a more informative way :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/tracker.c

    r7824 r7825  
    721721    TR_REQ_PAUSED,     /* BEP 21 */
    722722    TR_REQ_REANNOUNCE,
    723     TR_REQ_SCRAPE
     723    TR_REQ_SCRAPE,
     724    TR_NUM_REQ_TYPES
    724725};
    725726
     
    872873{
    873874    struct tr_tracker_request * req = vreq;
    874     tr_tracker * t = findTracker( req->session, req->torrentId );
    875 
    876     if( t )
     875    tr_tracker * t;
     876
     877    assert( req != NULL );
     878    assert( tr_isSession( req->session ) );
     879    assert( req->torrentId >= 0 );
     880    assert( req->reqtype >= 0 );
     881    assert( req->reqtype < TR_NUM_REQ_TYPES );
     882
     883    t = findTracker( req->session, req->torrentId );
     884
     885    if( t != NULL )
    877886    {
    878887        const time_t now = time( NULL );
     
    891900    }
    892901
     902    assert( req->session->tracker != NULL );
    893903    ++req->session->tracker->runningCount;
    894904
     
    905915               tr_tracker * tracker )
    906916{
    907     struct tr_tracker_request * req = createScrape( session, tracker );
     917    struct tr_tracker_request * req;
     918    assert( tr_isSession( session ) );
     919
     920    req = createScrape( session, tracker );
    908921    tr_runInEventThread( session, invokeRequest, req );
    909922}
     
    914927                int          reqtype )
    915928{
    916     struct tr_tracker_request * req = createRequest( session, tracker, reqtype );
     929    struct tr_tracker_request * req;
     930    assert( tr_isSession( session ) );
     931
     932    req = createRequest( session, tracker, reqtype );
    917933    tr_runInEventThread( session, invokeRequest, req );
    918934}
Note: See TracChangeset for help on using the changeset viewer.