From ef41303f8529f8fffb307c3cf3f2ccda1697caaf Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 15 Sep 2014 01:44:55 -0400 Subject: this works now --- ssh.py | 7 ++----- termcast.py | 5 ++--- 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): -- cgit v1.2.3-54-g00ecf