Fix bug causing new state numbers when not necessary
This commit is contained in:
@@ -131,9 +131,7 @@ void Transport<MyState, RemoteState>::send_to_receiver( void )
|
|||||||
/* If this is the final diff in a sequence, make sure it does get the highest
|
/* If this is the final diff in a sequence, make sure it does get the highest
|
||||||
state number (even if we've retread to previously-seen ground ) */
|
state number (even if we've retread to previously-seen ground ) */
|
||||||
/* This will force the client to update to this state */
|
/* This will force the client to update to this state */
|
||||||
typename list< TimestampedState<MyState> >::iterator last = sent_states.end();
|
if ( (previously_sent->num != sent_states.back().num)
|
||||||
last--;
|
|
||||||
if ( (previously_sent != last)
|
|
||||||
&& (new_state == target_receiver_state) ) {
|
&& (new_state == target_receiver_state) ) {
|
||||||
previously_sent = sent_states.end();
|
previously_sent = sent_states.end();
|
||||||
}
|
}
|
||||||
@@ -153,6 +151,7 @@ void Transport<MyState, RemoteState>::send_to_receiver( void )
|
|||||||
string s = inst.tostring();
|
string s = inst.tostring();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
fprintf( stderr, "Sent instruction from %d => %d (terminal %d)\r\n", int(inst.old_num), int(inst.new_num), int(sent_states.back().num) );
|
||||||
connection.send( s );
|
connection.send( s );
|
||||||
} catch ( MTUException m ) {
|
} catch ( MTUException m ) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user