1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00

remove more dead code. this scaffolding was to let libevent play nice back when we had one thread per torrent

This commit is contained in:
Charles Kerr 2007-11-19 16:30:31 +00:00
parent 3929b37da3
commit 41b1f76d9b

View file

@ -65,7 +65,6 @@ enum mode
{
TR_EV_EVHTTP_MAKE_REQUEST,
TR_EV_TIMER_ADD,
TR_EV_TIMER_DEL,
TR_EV_EXEC
};
@ -131,12 +130,6 @@ pumpList( int i UNUSED, short s UNUSED, void * veh )
++eh->timerCount;
break;
case TR_EV_TIMER_DEL:
event_del( &cmd->timer->event );
tr_free( cmd->timer );
--eh->timerCount;
break;
case TR_EV_EVHTTP_MAKE_REQUEST:
evhttp_make_request( cmd->evcon, cmd->req, cmd->evtype, cmd->uri );
tr_free( cmd->uri );
@ -320,18 +313,13 @@ tr_timerFree( tr_timer ** ptimer )
/* destroy the timer directly or via the command queue */
if( timer!=NULL && !timer->inCallback ) {
if( tr_amInThread( timer->eh->thread ) ) {
void * del = tr_list_remove( &timer->eh->commands, timer, timerCompareFunc );
--timer->eh->timerCount;
event_del( &timer->event );
tr_free( timer );
tr_free( del );
} else {
struct tr_event_command * cmd = tr_new0( struct tr_event_command, 1 );
cmd->mode = TR_EV_TIMER_DEL;
cmd->timer = timer;
pushList( timer->eh, cmd );
}
void * del;
assert( tr_amInEventThread( timer->eh->h ) );
del = tr_list_remove( &timer->eh->commands, timer, timerCompareFunc );
--timer->eh->timerCount;
event_del( &timer->event );
tr_free( timer );
tr_free( del );
}
}