Changeset 3846


Ignore:
Timestamp:
Nov 17, 2007, 2:47:47 AM (15 years ago)
Author:
charles
Message:

remove yet more dead code

Location:
trunk/libtransmission
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/handshake.c

    r3839 r3846  
    969969{
    970970    dbgmsg( handshake, "handshakeDone: %s", isOK ? "connected" : "aborting" );
    971     tr_peerIoSetIOFuncs( handshake->io, NULL, NULL, NULL, NULL );
     971    tr_peerIoSetIOFuncs( handshake->io, NULL, NULL, NULL );
    972972
    973973    fireDoneFunc( handshake, isOK );
     
    10311031    handshake->handle = tr_peerIoGetHandle( io );
    10321032   
    1033     tr_peerIoSetIOFuncs( handshake->io, canRead, NULL, gotError, handshake );
     1033    tr_peerIoSetIOFuncs( handshake->io, canRead, gotError, handshake );
    10341034
    10351035    if( tr_peerIoIsIncoming( handshake->io ) )
  • trunk/libtransmission/peer-io.c

    r3845 r3846  
    6161
    6262    tr_can_read_cb     canRead;
    63     tr_did_write_cb    didWrite;
    6463    tr_net_error_cb    gotError;
    6564    void             * userData;
     
    7170***
    7271**/
    73 
    74 static void
    75 didWriteWrapper( struct bufferevent * e, void * userData )
    76 {
    77     tr_peerIo * c = userData;
    78     if( c->didWrite != NULL )
    79         (*c->didWrite)( e, c->userData );
    80 }
    8172
    8273static void
     
    142133    c->bufev = bufferevent_new( c->socket,
    143134                                canReadWrapper,
    144                                 didWriteWrapper,
     135                                NULL,
    145136                                gotErrorWrapper,
    146137                                c );
     
    200191    {
    201192        io->canRead = NULL;
    202         io->didWrite = NULL;
    203193        io->gotError = NULL;
    204194        tr_runInEventThread( io->handle, io_dtor, io );
     
    250240tr_peerIoSetIOFuncs( tr_peerIo          * io,
    251241                     tr_can_read_cb       readcb,
    252                      tr_did_write_cb      writecb,
    253242                     tr_net_error_cb      errcb,
    254243                     void               * userData )
    255244{
    256245    io->canRead = readcb;
    257     io->didWrite = writecb;
    258246    io->gotError = errcb;
    259247    io->userData = userData;
     
    283271
    284272        io->bufev = bufferevent_new( io->socket,
    285                                      canReadWrapper,
    286                                      didWriteWrapper,
    287                                      gotErrorWrapper,
     273                                     canReadWrapper, NULL, gotErrorWrapper,
    288274                                     io );
    289275        bufferevent_settimeout( io->bufev, IO_TIMEOUT_SECS, IO_TIMEOUT_SECS );
  • trunk/libtransmission/peer-io.h

    r3839 r3846  
    100100typedef enum { READ_MORE, READ_AGAIN, READ_DONE } ReadState;
    101101typedef ReadState (*tr_can_read_cb)(struct bufferevent*, void* user_data);
    102 typedef void (*tr_did_write_cb)(struct bufferevent *, void *);
    103102typedef void (*tr_net_error_cb)(struct bufferevent *, short what, void *);
    104103
    105104void  tr_peerIoSetIOFuncs( tr_peerIo        * io,
    106105                           tr_can_read_cb     readcb,
    107                            tr_did_write_cb    writecb,
    108106                           tr_net_error_cb    errcb,
    109107                           void             * user_data );
  • trunk/libtransmission/peer-msgs.c

    r3842 r3846  
    17781778   
    17791779    tr_peerIoSetTimeoutSecs( m->io, 150 ); /* timeout after N seconds of inactivity */
    1780     tr_peerIoSetIOFuncs( m->io, canRead, NULL, gotError, m );
     1780    tr_peerIoSetIOFuncs( m->io, canRead, gotError, m );
    17811781    ratePulse( m );
    17821782
Note: See TracChangeset for help on using the changeset viewer.