Remove some debugging code
This commit is contained in:
+1
-1
@@ -76,7 +76,7 @@ namespace Network {
|
|||||||
void send( string &s );
|
void send( string &s );
|
||||||
string recv( void );
|
string recv( void );
|
||||||
int fd( void ) { return sock; }
|
int fd( void ) { return sock; }
|
||||||
int get_MTU( void ) { return 110; }
|
int get_MTU( void ) { return MTU; }
|
||||||
|
|
||||||
int port( void );
|
int port( void );
|
||||||
string get_key( void ) { return key.printable_key(); }
|
string get_key( void ) { return key.printable_key(); }
|
||||||
|
|||||||
@@ -131,9 +131,13 @@ 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 */
|
||||||
if ( (previously_sent->num != sent_states.back().num)
|
if ( new_state == target_receiver_state ) {
|
||||||
&& (new_state == target_receiver_state) ) {
|
if ( new_state == sent_states.back().state ) {
|
||||||
previously_sent = sent_states.end();
|
previously_sent = sent_states.end();
|
||||||
|
previously_sent--;
|
||||||
|
} else {
|
||||||
|
previously_sent = sent_states.end();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( previously_sent == sent_states.end() ) { /* not previously sent */
|
if ( previously_sent == sent_states.end() ) { /* not previously sent */
|
||||||
|
|||||||
@@ -102,10 +102,8 @@ int main( int argc, char *argv[] )
|
|||||||
|
|
||||||
if ( fds[ 0 ].revents & POLLIN ) {
|
if ( fds[ 0 ].revents & POLLIN ) {
|
||||||
char x = getchar();
|
char x = getchar();
|
||||||
for ( int i = 0; i < 20; i++ ) {
|
|
||||||
n->get_current_state().key_hit( x );
|
n->get_current_state().key_hit( x );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ( fds[ 1 ].revents & POLLIN ) {
|
if ( fds[ 1 ].revents & POLLIN ) {
|
||||||
n->recv();
|
n->recv();
|
||||||
|
|||||||
Reference in New Issue
Block a user