chiark / gitweb /
wip
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 19 Mar 2017 21:05:44 +0000 (21:05 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 19 Mar 2017 21:05:44 +0000 (21:05 +0000)
server

diff --git a/server b/server
index 9987a1d..b3285ed 100755 (executable)
--- a/server
+++ b/server
@@ -88,9 +88,9 @@ class IpifProcessProtocol(twisted.internet.protocol.ProcessProtocol):
     self._buffer = b''
   def connectionMade(self): pass
   def outReceived(self, data):
-    buffer += data
-    packets = slip_decode(buffer)
-    buffer = packets.pop()
+    self._buffer += data
+    packets = slip_decode(self._buffer)
+    self._buffer = packets.pop()
     for packet in packets:
       (saddr, daddr) = packet_addrs(packet)
       route(packet, daddr)