Changeset 3829


Ignore:
Timestamp:
Nov 15, 2007, 4:43:46 PM (14 years ago)
Author:
charles
Message:

remove dead code.

Location:
trunk/libtransmission
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-io.c

    r3775 r3829  
    404404                int           writeme_len )
    405405{
    406     tr_bufferevent_write( io->handle, io->bufev, writeme, writeme_len );
     406    assert( tr_amInEventThread( io->handle ) );
     407    bufferevent_write( io->bufev, (void*)writeme, writeme_len );
    407408}
    408409
  • trunk/libtransmission/trevent.c

    r3796 r3829  
    6666    TR_EV_EVHTTP_MAKE_REQUEST,
    6767    TR_EV_BUFFEREVENT_SET,
    68     TR_EV_BUFFEREVENT_WRITE,
    6968    TR_EV_TIMER_ADD,
    7069    TR_EV_TIMER_DEL,
     
    148147                bufferevent_enable( cmd->bufev, cmd->enable );
    149148                bufferevent_disable( cmd->bufev, cmd->disable );
    150                 break;
    151 
    152             case TR_EV_BUFFEREVENT_WRITE:
    153                 bufferevent_write( cmd->bufev, cmd->buf, cmd->buflen );
    154                 tr_free( cmd->buf );
    155149                break;
    156150
     
    256250}
    257251
     252int
     253tr_amInEventThread( struct tr_handle * handle )
     254{
     255    return tr_amInThread( handle->events->thread );
     256}
     257
     258
    258259void
    259260tr_evhttp_make_request (tr_handle                 * handle,
     
    273274        cmd->evtype = type;
    274275        cmd->uri = uri;
    275         pushList( handle->events, cmd );
    276     }
    277 }
    278 
    279 void
    280 tr_bufferevent_write( tr_handle             * handle,
    281                       struct bufferevent    * bufev,
    282                       const void            * buf,
    283                       size_t                  buflen )
    284 {
    285     if( tr_amInThread( handle->events->thread ) )
    286         bufferevent_write( bufev, (void*)buf, buflen );
    287     else {
    288         struct tr_event_command * cmd = tr_new0( struct tr_event_command, 1 );
    289         cmd->mode = TR_EV_BUFFEREVENT_WRITE;
    290         cmd->bufev = bufev;
    291         cmd->buf = tr_strndup( buf, buflen );
    292         cmd->buflen = buflen;
    293276        pushList( handle->events, cmd );
    294277    }
  • trunk/libtransmission/trevent.h

    r3457 r3829  
    3838                             char                      * uri);
    3939
    40 void tr_bufferevent_write( struct tr_handle    * tr_handle,
    41                            struct bufferevent  * bufferEvent,
    42                            const void          * buf,
    43                            size_t                buflen );
    44 
    45 
    4640void tr_setBufferEventMode( struct tr_handle   * tr_handle,
    4741                            struct bufferevent * bufferEvent,
    4842                            short                mode_enable,
    4943                            short                mode_disable );
     44
     45int tr_amInEventThread( struct tr_handle * handle );
    5046
    5147/**
Note: See TracChangeset for help on using the changeset viewer.