]> granicus.if.org Git - transmission/commitdiff
rename `pulse' as peerPulse() and trackerPulse() to make backtraces easier to read
authorCharles Kerr <charles@transmissionbt.com>
Mon, 28 Jul 2008 19:47:16 +0000 (19:47 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Mon, 28 Jul 2008 19:47:16 +0000 (19:47 +0000)
libtransmission/peer-msgs.c
libtransmission/tracker.c

index 7e422f2c2fa2a178b4cef7606ad1c7c257c36bdc..843df36de6d010d5544b3b5d25966d0cf244dad9 100644 (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( );
index 7b152fe49af6cc9a47516b7f7a4c302dda3d60d0..4bbe380bd9da8bc30bf1acab22667607a6854c2a 100644 (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 );
     }
 }