Changeset 9273


Ignore:
Timestamp:
Oct 10, 2009, 5:37:34 PM (13 years ago)
Author:
charles
Message:

(trunk libT) more assertions to help find the cause of #2480

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/handshake.c

    r9131 r9273  
    10271027    tr_bool           readyForMore = TRUE;
    10281028
     1029    assert( tr_isPeerIo( io ) );
     1030
    10291031    /* no piece data in handshake */
    10301032    *piece = 0;
  • trunk/libtransmission/peer-io.c

    r8889 r9273  
    116116canReadWrapper( tr_peerIo * io )
    117117{
     118    tr_bool err = 0;
    118119    tr_bool done = 0;
    119     tr_bool err = 0;
    120     tr_session * session = io->session;
     120    tr_session * session;
    121121
    122122    dbgmsg( io, "canRead" );
    123123
     124    assert( tr_isPeerIo( io ) );
     125    assert( tr_isSession( io->session ) );
    124126    tr_peerIoRef( io );
     127
     128    session = io->session;
    125129
    126130    /* try to consume the input buffer */
     
    161165                    break;
    162166            }
     167
     168            assert( tr_isPeerIo( io ) );
    163169        }
    164170
     
    172178    }
    173179
     180    assert( tr_isPeerIo( io ) );
    174181    tr_peerIoUnref( io );
    175182}
Note: See TracChangeset for help on using the changeset viewer.