From 6651dde25a43332dd93aba7b26039161ae1c0cf7 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Wed, 23 May 2018 08:17:26 +0000 Subject: [PATCH] #1838: the packet queue belongs in the core class (also fix logging of mixin variables that may not exist) git-svn-id: https://xpra.org/svn/Xpra/trunk@19375 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/xpra/server/source/client_connection.py | 7 ++++++- src/xpra/server/source/encodings_mixin.py | 4 ---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/xpra/server/source/client_connection.py b/src/xpra/server/source/client_connection.py index 4ecc0d1903..339c03a6e1 100644 --- a/src/xpra/server/source/client_connection.py +++ b/src/xpra/server/source/client_connection.py @@ -7,6 +7,7 @@ # later version. See the file COPYING for details. from threading import Event +from collections import deque from xpra.log import Logger log = Logger("server") @@ -119,6 +120,10 @@ def __init__(self, protocol, disconnect_cb, session_name, server, except Exception as e: raise Exception("failed to initialize %s: %s" % (bc, e)) + self.packet_queue = deque() #holds actual packets ready for sending (already encoded) + #these packets are picked off by the "protocol" via 'next_packet()' + #format: packet, wid, pixels, start_send_cb, end_send_cb + #(only packet is required - the rest can be 0/None for clipboard packets) self.ordinary_packets = [] self.socket_dir = socket_dir self.unix_socket_paths = unix_socket_paths @@ -238,6 +243,7 @@ def parse_hello(self, c): self.info_namespace = c.boolget("info-namespace") self.send_notifications = c.boolget("notifications") self.send_notifications_actions = c.boolget("notifications.actions") + log("notifications=%s, actions=%s", self.send_notifications, self.send_notifications_actions) self.share = c.boolget("share") self.lock = c.boolget("lock") self.control_commands = c.strlistget("control_commands") @@ -247,7 +253,6 @@ def parse_hello(self, c): else: self.bandwidth_limit = min(self.server_bandwidth_limit, bandwidth_limit) bandwidthlog("server bandwidth-limit=%s, client bandwidth-limit=%s, value=%s", self.server_bandwidth_limit, bandwidth_limit, self.bandwidth_limit) - log("cursors=%s (encodings=%s), bell=%s, notifications=%s", self.send_cursors, self.cursor_encodings, self.send_bell, self.send_notifications) cinfo = self.get_connect_info() for i,ci in enumerate(cinfo): diff --git a/src/xpra/server/source/encodings_mixin.py b/src/xpra/server/source/encodings_mixin.py index 9a990ffa31..3a498a3af3 100644 --- a/src/xpra/server/source/encodings_mixin.py +++ b/src/xpra/server/source/encodings_mixin.py @@ -81,10 +81,6 @@ def __init__(self): self.encode_work_queue = Queue() #holds functions to call to compress data (pixels, clipboard) #items placed in this queue are picked off by the "encode" thread, #the functions should add the packets they generate to the 'packet_queue' - self.packet_queue = deque() #holds actual packets ready for sending (already encoded) - #these packets are picked off by the "protocol" via 'next_packet()' - #format: packet, wid, pixels, start_send_cb, end_send_cb - #(only packet is required - the rest can be 0/None for clipboard packets) self.encode_thread = start_thread(self.encode_loop, "encode") def init_from(self, _protocol, server):