From ec4a75dcaf5bde65caa3c6a724a84747d7353bf9 Mon Sep 17 00:00:00 2001 From: Keith Winstein Date: Sun, 14 Aug 2011 02:15:53 -0400 Subject: [PATCH] Eliminate synthetic packet loss and tab comparison --- network.cpp | 5 ----- terminalframebuffer.hpp | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/network.cpp b/network.cpp index 045370a..5e7185c 100644 --- a/network.cpp +++ b/network.cpp @@ -177,11 +177,6 @@ void Connection::send( string &s, bool send_timestamp ) string p = px.tostring( &session ); - /* XXX synthetic packet loss */ - if ( rand() < RAND_MAX / 2 ) { - return; - } - ssize_t bytes_sent = sendto( sock, p.data(), p.size(), 0, (sockaddr *)&remote_addr, sizeof( remote_addr ) ); diff --git a/terminalframebuffer.hpp b/terminalframebuffer.hpp index 59d22e1..bbc5cf3 100644 --- a/terminalframebuffer.hpp +++ b/terminalframebuffer.hpp @@ -154,10 +154,10 @@ namespace Terminal { bool operator==( const DrawState &x ) const { - /* XXX other fields not necessary to compare -- for now */ + /* only compare fields that affect display */ return ( width == x.width ) && ( height == x.height ) && ( cursor_col == x.cursor_col ) && ( cursor_row == x.cursor_row ) && ( cursor_visible == x.cursor_visible ) && - ( reverse_video == x.reverse_video ) && ( renditions == x.renditions ) && ( tabs == x.tabs ); + ( reverse_video == x.reverse_video ) && ( renditions == x.renditions ); } };