aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-09-15 01:44:55 -0400
committerJesse Luehrs <doy@tozt.net>2014-09-15 01:45:36 -0400
commitef41303f8529f8fffb307c3cf3f2ccda1697caaf (patch)
tree4ee2db1d53b482b133309c6adba8d90bc9aa5a7e
parent070da900a4bdda26ee4ee00ad6e3d9fcb6aa262a (diff)
downloadpython-termcast-server-ef41303f8529f8fffb307c3cf3f2ccda1697caaf.tar.gz
python-termcast-server-ef41303f8529f8fffb307c3cf3f2ccda1697caaf.zip
this works now
-rw-r--r--ssh.py7
-rw-r--r--termcast.py5
2 files changed, 4 insertions, 8 deletions
diff --git a/ssh.py b/ssh.py
index 5e88834..809bb2d 100644
--- a/ssh.py
+++ b/ssh.py
@@ -15,8 +15,6 @@ class Connection(object):
self.watching_id = self.select_stream()
- # XXX need to have the user select a stream, and then pass the stream's
- # id in here
self.publisher.notify("new_viewer", self.watching_id)
while True:
@@ -47,9 +45,8 @@ class Connection(object):
return self.select_stream()
def msg_new_data(self, connection_id, prev_buf, data):
- # XXX uncomment this once we implement stream selection
- # if self.watching_id != connection_id:
- # return
+ if self.watching_id != connection_id:
+ return
if not self.initialized:
self.chan.send(prev_buf)
diff --git a/termcast.py b/termcast.py
index c5495cf..d305dff 100644
--- a/termcast.py
+++ b/termcast.py
@@ -78,9 +78,8 @@ class Connection(object):
return
def msg_new_viewer(self, connection_id):
- # XXX restore this once we start passing in meaningful connection ids
- # if connection_id != self.connection_id:
- # return
+ if connection_id != self.connection_id:
+ return
self.publisher.notify("new_data", self.connection_id, self.handler.buf, b'')
def request_get_streamers(self):