Optional verifier for round-trippability, and fix wrapping and tab bugs.

This commit is contained in:
Keith Winstein
2012-04-16 07:46:18 -04:00
parent 18dc967c09
commit feb352c809
7 changed files with 93 additions and 19 deletions
+9
View File
@@ -143,6 +143,15 @@ void TransportSender<MyState>::tick( void )
string diff = current_state.diff_from( assumed_receiver_state->state );
/* verify diff has round-trip identity (modulo Unicode fallback rendering) */
/*
MyState newstate( assumed_receiver_state->state );
newstate.apply_string( diff );
if ( current_state.compare( newstate ) ) {
fprintf( stderr, "Diff: %s\n", diff.c_str() );
}
*/
if ( diff.empty() && (now >= next_ack_time) ) {
send_empty_ack();
return;