Changeset 7619


Ignore:
Timestamp:
Jan 5, 2009, 6:45:08 AM (12 years ago)
Author:
charles
Message:

(trunk libT) probably fix r7618 reported in #transmission by Rolcol

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/handshake.c

    r7618 r7619  
    10961096{
    10971097    if( handshake->io )
    1098         tr_peerIoUnref( handshake->io );
     1098        tr_peerIoUnref( handshake->io ); /* balanced by the ref in tr_handshakeNew */
    10991099
    11001100    tr_free( handshake );
     
    11731173    handshake->session = tr_peerIoGetSession( io );
    11741174
     1175    tr_peerIoRef( io ); /* balanced by the unref in tr_handshakeFree */
    11751176    tr_peerIoSetIOFuncs( handshake->io, canRead, NULL, gotError, handshake );
    11761177
  • trunk/libtransmission/peer-mgr.c

    r7618 r7619  
    356356    }
    357357
    358     tr_peerIoUnref( peer->io );
     358    tr_peerIoUnref( peer->io ); /* balanced by the ref in handshakeDoneCB() */
    359359
    360360    tr_bitfieldFree( peer->have );
     
    12591259                peer->port = port;
    12601260                peer->io = tr_handshakeStealIO( handshake );
     1261                tr_peerIoRef( peer->io ); /* balanced by the unref in peerDestructor() */
    12611262                tr_peerIoSetParent( peer->io, t->tor->bandwidth );
    12621263                tr_peerMsgsNew( t->tor, peer, peerCallbackFunc, t, &peer->msgsTag );
     
    13041305                                     myHandshakeDoneCB,
    13051306                                     manager );
     1307
     1308        tr_peerIoUnref( io ); /* balanced by the implicit ref in tr_peerIoNewIncoming() */
    13061309
    13071310        tr_ptrArrayInsertSorted( &manager->incomingHandshakes, handshake,
     
    23262329                assert( tr_peerIoGetTorrentHash( io ) );
    23272330
     2331                tr_peerIoUnref( io ); /* balanced by the implicit ref in tr_peerIoNewOutgoing() */
     2332
    23282333                ++newConnectionsThisSecond;
    23292334
Note: See TracChangeset for help on using the changeset viewer.