# # # patch "netsync.cc" # from [03b228fbbfd9e84ac504ce39842a2ad4d9e62d57] # to [428cc72851e0385c92fc51c68cf9674320a43124] # ============================================================ --- netsync.cc 03b228fbbfd9e84ac504ce39842a2ad4d9e62d57 +++ netsync.cc 428cc72851e0385c92fc51c68cf9674320a43124 @@ -366,16 +366,16 @@ private: string_queue inbuf; private: deque< pair > outbuf; - size_t outbuf_size; // so we can avoid queueing up too much stuff + size_t outbuf_bytes; // so we can avoid queueing up too much stuff protected: void queue_output(string const & s) { outbuf.push_back(make_pair(s, 0)); - outbuf_size += s.size(); + outbuf_bytes += s.size(); } bool output_overfull() const { - return outbuf_size > constants::bufsz * 10; + return outbuf_bytes > constants::bufsz * 10; } public: string peer_id; @@ -397,7 +397,7 @@ public: session_base(string const & peer_id, shared_ptr str) : - outbuf_size(0), + outbuf_bytes(0), peer_id(peer_id), str(str), last_io_time(::time(NULL)), protocol_state(working_state), @@ -528,7 +528,7 @@ session_base::write_some() { if ((size_t)count == writelen) { - outbuf_size -= outbuf.front().first.size(); + outbuf_bytes -= outbuf.front().first.size(); outbuf.pop_front(); } else