Fix debugging output display bug
This commit is contained in:
@@ -85,15 +85,15 @@ void Transport<MyState, RemoteState>::recv( void )
|
|||||||
if ( i->num > new_state.num ) {
|
if ( i->num > new_state.num ) {
|
||||||
received_states.insert( i, new_state );
|
received_states.insert( i, new_state );
|
||||||
if ( verbose ) {
|
if ( verbose ) {
|
||||||
fprintf( stderr, "[%d] Received OUT-OF-ORDER state %d [ack %d]\n",
|
fprintf( stderr, "[%u] Received OUT-OF-ORDER state %d [ack %d]\n",
|
||||||
(int)timestamp() % 100000, (int)new_state.num, (int)inst.ack_num() );
|
(unsigned int)(timestamp() % 100000), (int)new_state.num, (int)inst.ack_num() );
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( verbose ) {
|
if ( verbose ) {
|
||||||
fprintf( stderr, "[%d] Received state %d [ack %d]\n",
|
fprintf( stderr, "[%u] Received state %d [ack %d]\n",
|
||||||
(int)timestamp() % 100000, (int)new_state.num, (int)inst.ack_num() );
|
(unsigned int)(timestamp() % 100000), (int)new_state.num, (int)inst.ack_num() );
|
||||||
}
|
}
|
||||||
received_states.push_back( new_state );
|
received_states.push_back( new_state );
|
||||||
sender.set_ack_num( received_states.back().num );
|
sender.set_ack_num( received_states.back().num );
|
||||||
|
|||||||
+2
-2
@@ -248,8 +248,8 @@ void TransportSender<MyState>::send_in_fragments( string diff, uint64_t new_num
|
|||||||
connection->send( i->tostring() );
|
connection->send( i->tostring() );
|
||||||
|
|
||||||
if ( verbose ) {
|
if ( verbose ) {
|
||||||
fprintf( stderr, "[%d] Sent [%d=>%d] id %d, frag %d ack=%d, throwaway=%d, len=%d, frame rate=%.2f, timeout=%d\n",
|
fprintf( stderr, "[%u] Sent [%d=>%d] id %d, frag %d ack=%d, throwaway=%d, len=%d, frame rate=%.2f, timeout=%d\n",
|
||||||
(int)(timestamp() % 100000), (int)inst.old_num(), (int)inst.new_num(), (int)i->id, (int)i->fragment_num,
|
(unsigned int)(timestamp() % 100000), (int)inst.old_num(), (int)inst.new_num(), (int)i->id, (int)i->fragment_num,
|
||||||
(int)inst.ack_num(), (int)inst.throwaway_num(), (int)i->contents.size(),
|
(int)inst.ack_num(), (int)inst.throwaway_num(), (int)i->contents.size(),
|
||||||
1000.0 / (double)send_interval(),
|
1000.0 / (double)send_interval(),
|
||||||
(int)connection->timeout() );
|
(int)connection->timeout() );
|
||||||
|
|||||||
Reference in New Issue
Block a user