KEEPALIVE_INTERVAL_SECS = 100,
PEX_INTERVAL = (90 * 1000), /* msec between sendPex() calls */
- PEER_PULSE_INTERVAL = (50), /* msec between pulse() calls */
+ PEER_PULSE_INTERVAL = (50), /* msec between peerPulse() calls */
RATE_PULSE_INTERVAL = (250), /* msec between ratePulse() calls */
MAX_QUEUE_SIZE = (100),
}
static int
-pulse( void * vmsgs );
+peerPulse( void * vmsgs );
static int
requestQueueIsFull( const tr_peermsgs * msgs )
static void
didWrite( struct bufferevent * evin UNUSED, void * vmsgs )
{
- pulse( vmsgs );
+ peerPulse( vmsgs );
}
static ReadState
}
static int
-pulse( void * vmsgs )
+peerPulse( void * vmsgs )
{
const time_t now = time( NULL );
tr_peermsgs * msgs = vmsgs;
m->info->peerIsInterested = 0;
m->info->have = tr_bitfieldNew( torrent->info.pieceCount );
m->state = AWAITING_BT_LENGTH;
- m->pulseTimer = tr_timerNew( m->handle, pulse, m, PEER_PULSE_INTERVAL );
+ m->pulseTimer = tr_timerNew( m->handle, peerPulse, m, PEER_PULSE_INTERVAL );
m->rateTimer = tr_timerNew( m->handle, ratePulse, m, RATE_PULSE_INTERVAL );
m->pexTimer = tr_timerNew( m->handle, pexPulse, m, PEX_INTERVAL );
m->outMessages = evbuffer_new( );
tr_timer * pulseTimer;
};
-static int pulse( void * vsession );
+static int trackerPulse( void * vsession );
static void
ensureGlobalsExist( tr_session * session )
if( session->tracker == NULL )
{
session->tracker = tr_new0( struct tr_tracker_handle, 1 );
- session->tracker->pulseTimer = tr_timerNew( session, pulse, session, PULSE_INTERVAL_MSEC );
+ session->tracker->pulseTimer = tr_timerNew( session, trackerPulse, session, PULSE_INTERVAL_MSEC );
dbgmsg( NULL, "creating tracker timer" );
}
}
}
static int
-pulse( void * vsession )
+trackerPulse( void * vsession )
{
tr_session * session = vsession;
struct tr_tracker_handle * th = session->tracker;
{
--session->tracker->runningCount;
dbgmsg( NULL, "decrementing runningCount to %d", session->tracker->runningCount );
- pulse( session );
+ trackerPulse( session );
}
}