diff --git a/src/netlib/tcpnetwork.c b/src/netlib/tcpnetwork.c index 747d7c35f..b1d0bc838 100644 --- a/src/netlib/tcpnetwork.c +++ b/src/netlib/tcpnetwork.c @@ -1738,7 +1738,7 @@ LOGICAL doTCPWriteV2( PCLIENT lpClient } if( !(lpClient->dwFlags & CF_ACTIVE ) ) { -//#ifdef VERBOSE_DEBUG +//#ifdef LOG_WRITE_AGGREGATION lprintf( "TCP Write failed - client is inactive" ); //#endif // change to inactive status by the time we got here... @@ -1748,12 +1748,12 @@ LOGICAL doTCPWriteV2( PCLIENT lpClient if( lpClient->lpFirstPending ) // will already be in a wait on network state... { -//#ifdef VERBOSE_DEBUG +#ifdef LOG_WRITE_AGGREGATION _lprintf( DBG_RELAY )( "Data already pending, pending buffer...%p %d", pInBuffer, nInLen ); -//#endif +#endif if( !failpending ) { -#ifdef VERBOSE_DEBUG +#ifdef LOG_WRITE_AGGREGATION lprintf( "Queuing pending data anyhow..." ); #endif // this doesn't re-trigger sending; it assumes the network write-ready event will do that. diff --git a/src/timerlib/timers.c b/src/timerlib/timers.c index ba10331ca..20dc806c3 100644 --- a/src/timerlib/timers.c +++ b/src/timerlib/timers.c @@ -23,6 +23,8 @@ #define MEMORY_STRUCT_DEFINED #define DEFINE_MEMORY_STRUCT +//#define DEBUG_TIMER_RESCHEDULE + #define THREAD_STRUCTURE_DEFINED #include // Sleep() @@ -2240,7 +2242,9 @@ static void InternalRescheduleTimerEx( PTIMER timer, uint32_t delay ) // grabbing the timer this way should put its delta into the next. PTIMER bGrabbed = GrabTimer( timer, FALSE ); if (globalTimerData.flags.away_in_timer && globalTimerData.CurrentTimerID == timer->ID) { +#ifdef DEBUG_TIMER_RESCHEDULE lprintf("Timer is dispatched/close to being dispatched. %d", timer->ID); +#endif timer->flags.bRescheduled = 1; // tracks reschedule during callback } timer->delta = (int32_t)delay; // should never pass a negative value here, but delta can be negative. @@ -2274,7 +2278,9 @@ void RescheduleTimerEx( uint32_t ID, uint32_t delay ) if( !ID ) { timer =globalTimerData.current_timer; +#ifdef DEBUG_TIMER_RESCHEDULE lprintf("timer 0 specified - use current timer (if there is one?) %d", timer ? timer->ID : -1); +#endif } else { @@ -2288,11 +2294,15 @@ void RescheduleTimerEx( uint32_t ID, uint32_t delay ) // dispatched and we get here (timer itself rescheduling itself) if( globalTimerData.current_timer && globalTimerData.current_timer->ID == ID ) timer = globalTimerData.current_timer; +#ifdef DEBUG_TIMER_RESCHEDULE lprintf("timer is processing? %d %d", ID, timer ? timer->ID : -1); +#endif } +#ifdef DEBUG_TIMER_RESCHEDULE else { - lprintf("timer found to reschedule %d", timer ? timer->ID : -1); + lprintf("timer found to reschedule %d", timer ? timer->ID : -1); } +#endif } InternalRescheduleTimerEx( timer, delay ); LeaveCriticalSec( &globalTimerData.csGrab );