1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-04 10:38:13 +00:00

rename `pulse' as peerPulse() and trackerPulse() to make backtraces easier to read

This commit is contained in:
Charles Kerr 2008-07-28 19:47:16 +00:00
parent 24ec4d2f94
commit 96ae464283
2 changed files with 9 additions and 9 deletions

View file

@ -67,7 +67,7 @@ enum
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),
@ -835,7 +835,7 @@ pumpRequestQueue( tr_peermsgs * msgs )
}
static int
pulse( void * vmsgs );
peerPulse( void * vmsgs );
static int
requestQueueIsFull( const tr_peermsgs * msgs )
@ -1545,7 +1545,7 @@ clientGotBlock( tr_peermsgs * msgs,
static void
didWrite( struct bufferevent * evin UNUSED, void * vmsgs )
{
pulse( vmsgs );
peerPulse( vmsgs );
}
static ReadState
@ -1645,7 +1645,7 @@ popNextRequest( tr_peermsgs * msgs, struct peer_request * setme )
}
static int
pulse( void * vmsgs )
peerPulse( void * vmsgs )
{
const time_t now = time( NULL );
tr_peermsgs * msgs = vmsgs;
@ -1922,7 +1922,7 @@ tr_peerMsgsNew( struct tr_torrent * torrent,
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( );

View file

@ -666,7 +666,7 @@ struct tr_tracker_handle
tr_timer * pulseTimer;
};
static int pulse( void * vsession );
static int trackerPulse( void * vsession );
static void
ensureGlobalsExist( tr_session * session )
@ -674,7 +674,7 @@ 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" );
}
}
@ -764,7 +764,7 @@ enqueueRequest( tr_session * session, tr_tracker * tracker, int reqtype )
}
static int
pulse( void * vsession )
trackerPulse( void * vsession )
{
tr_session * session = vsession;
struct tr_tracker_handle * th = session->tracker;
@ -813,7 +813,7 @@ onReqDone( tr_session * session )
{
--session->tracker->runningCount;
dbgmsg( NULL, "decrementing runningCount to %d", session->tracker->runningCount );
pulse( session );
trackerPulse( session );
}
}