From d756d6b58ffd2765fb1d201c8157f617fd67a530 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Fri, 2 Jan 2009 21:50:51 +0000 Subject: [PATCH] (trunk libT) commit some debugging messages that were added to trackdown the multicast filter issue --- libtransmission/bandwidth.c | 10 +++++++--- libtransmission/peer-mgr.c | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/libtransmission/bandwidth.c b/libtransmission/bandwidth.c index f8820edbb..e0841519a 100644 --- a/libtransmission/bandwidth.c +++ b/libtransmission/bandwidth.c @@ -22,6 +22,12 @@ #include "ptrarray.h" #include "utils.h" +#define dbgmsg( ... ) \ + do { \ + if( tr_deepLoggingIsActive( ) ) \ + tr_deepLog( __FILE__, __LINE__, NULL, __VA_ARGS__ ); \ + } while( 0 ) + /*** **** ***/ @@ -212,9 +218,7 @@ tr_bandwidthAllocate( tr_bandwidth * b, * small chunk of bandwidth. Keep looping until we run out of bandwidth * and/or peers that can use it */ n = peerCount; -#ifdef DEBUG_DIRECTION -if( dir == DEBUG_DIRECTION ) fprintf( stderr, "bandwidth.c: allocate: number of peerIos to go round-robin: %d\n", n ); -#endif + dbgmsg( "direction %s ... %d pees to go round-robin", (dir==TR_UP?"UP":"DOWN"), n ); i = n ? tr_cryptoWeakRandInt( n ) : 0; /* pick a random starting point */ while( n > 1 ) { diff --git a/libtransmission/peer-mgr.c b/libtransmission/peer-mgr.c index 505d969aa..a2b874828 100644 --- a/libtransmission/peer-mgr.c +++ b/libtransmission/peer-mgr.c @@ -2313,6 +2313,8 @@ reconnectPulse( void * vtorrent ) if( io == NULL ) { + tordbg( t, "peerIo not created; marking peer %s as unreachable", + tr_peerIoAddrStr( &atom->addr, atom->port ) ); atom->myflags |= MYFLAG_UNREACHABLE; } else -- 2.40.0