Commit 8bd72ff6 authored by Amos Latteier's avatar Amos Latteier

fixed bug in sized input collection code.

parent 21c96ce1
# -*- Mode: Python; tab-width: 4 -*- # -*- Mode: Python; tab-width: 4 -*-
# $Id: asynchat.py,v 1.2 1999/01/13 03:00:27 amos Exp $ # $Id: asynchat.py,v 1.3 1999/01/13 19:10:14 amos Exp $
# Author: Sam Rushing <rushing@nightmare.com> # Author: Sam Rushing <rushing@nightmare.com>
# ====================================================================== # ======================================================================
...@@ -120,7 +120,8 @@ class async_chat (asyncore.dispatcher): ...@@ -120,7 +120,8 @@ class async_chat (asyncore.dispatcher):
self.ac_in_buffer_read=0 self.ac_in_buffer_read=0
self.found_terminator() self.found_terminator()
else: else:
border=int(self.terminator-self.ac_in_buffer_read) # border < 0 border=int(self.terminator -
(self.ac_in_buffer_read-len(data)))
self.collect_incoming_data(self.ac_in_buffer[:border]) self.collect_incoming_data(self.ac_in_buffer[:border])
self.ac_in_buffer=self.ac_in_buffer[border:] self.ac_in_buffer=self.ac_in_buffer[border:]
self.ac_in_buffer_read=0 self.ac_in_buffer_read=0
......
# -*- Mode: Python; tab-width: 4 -*- # -*- Mode: Python; tab-width: 4 -*-
# $Id: asynchat.py,v 1.2 1999/01/13 03:00:27 amos Exp $ # $Id: asynchat.py,v 1.3 1999/01/13 19:10:14 amos Exp $
# Author: Sam Rushing <rushing@nightmare.com> # Author: Sam Rushing <rushing@nightmare.com>
# ====================================================================== # ======================================================================
...@@ -120,7 +120,8 @@ class async_chat (asyncore.dispatcher): ...@@ -120,7 +120,8 @@ class async_chat (asyncore.dispatcher):
self.ac_in_buffer_read=0 self.ac_in_buffer_read=0
self.found_terminator() self.found_terminator()
else: else:
border=int(self.terminator-self.ac_in_buffer_read) # border < 0 border=int(self.terminator -
(self.ac_in_buffer_read-len(data)))
self.collect_incoming_data(self.ac_in_buffer[:border]) self.collect_incoming_data(self.ac_in_buffer[:border])
self.ac_in_buffer=self.ac_in_buffer[border:] self.ac_in_buffer=self.ac_in_buffer[border:]
self.ac_in_buffer_read=0 self.ac_in_buffer_read=0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment