diff --git a/src/xpra/scripts/server.py b/src/xpra/scripts/server.py index 5955b5179a..b4aabe9914 100644 --- a/src/xpra/scripts/server.py +++ b/src/xpra/scripts/server.py @@ -907,26 +907,25 @@ def noerr(fn, *args): if ssh_port: add_mdns("ssh", "", ssh_port) - if False: - def b(v): - return v.lower() not in FALSE_OPTIONS - #turn off some server mixins: - from xpra.server import server_features - server_features.notifications = opts.notifications - server_features.webcam = b(opts.webcam) - server_features.clipboard = b(opts.clipboard) - server_features.audio = b(opts.speaker) or b(opts.microphone) - server_features.av_sync = server_features.audio and b(opts.av_sync) - server_features.fileprint = b(opts.printing) or b(opts.file_transfer) - server_features.mmap = b(opts.mmap) - server_features.input_devices = not opts.readonly - #server_features.commands = ?? - server_features.dbus = opts.dbus_proxy - #server_features.encoding = ?? - server_features.logging = b(opts.remote_logging) - #server_features.network_state = ?? - server_features.display = opts.windows - server_features.windows = opts.windows + def b(v): + return v.lower() not in FALSE_OPTIONS + #turn off some server mixins: + from xpra.server import server_features + server_features.notifications = opts.notifications + server_features.webcam = b(opts.webcam) + server_features.clipboard = b(opts.clipboard) + server_features.audio = b(opts.speaker) or b(opts.microphone) + server_features.av_sync = server_features.audio and b(opts.av_sync) + server_features.fileprint = b(opts.printing) or b(opts.file_transfer) + server_features.mmap = b(opts.mmap) + server_features.input_devices = not opts.readonly + #server_features.commands = ?? + server_features.dbus = opts.dbus_proxy + #server_features.encoding = ?? + server_features.logging = b(opts.remote_logging) + #server_features.network_state = ?? + server_features.display = opts.windows + server_features.windows = opts.windows kill_dbus = None if shadowing: diff --git a/src/xpra/server/source/client_connection.py b/src/xpra/server/source/client_connection.py index 3e993d02a3..012a03ab63 100644 --- a/src/xpra/server/source/client_connection.py +++ b/src/xpra/server/source/client_connection.py @@ -180,7 +180,8 @@ def close(self): def update_bandwidth_limits(self): - if self.mmap_size>0: + mmap_size = getattr(self, "mmap_size", 0) + if mmap_size>0: return #calculate soft bandwidth limit based on send congestion data: bandwidth_limit = 0 diff --git a/src/xpra/server/source/windows_mixin.py b/src/xpra/server/source/windows_mixin.py index d36e5ae607..9bc6bc5473 100644 --- a/src/xpra/server/source/windows_mixin.py +++ b/src/xpra/server/source/windows_mixin.py @@ -499,7 +499,11 @@ def make_window_source(self, wid, window): batch_config = self.make_batch_config(wid, window) ww, wh = window.get_dimensions() bandwidth_limit = self.bandwidth_limit - if getattr(self, "mmap_size", 0)>0: + mmap = getattr(self, "mmap", None) + mmap_size = getattr(self, "mmap_size", 0) + av_sync = getattr(self, "av_sync", False) + av_sync_delay = getattr(self, "av_sync_delay", 0) + if mmap_size>0: bandwidth_limit = 0 from xpra.server.window.window_video_source import WindowVideoSource ws = WindowVideoSource( @@ -508,13 +512,13 @@ def make_window_source(self, wid, window): self.record_congestion_event, self.queue_size, self.call_in_encode_thread, self.queue_packet, self.compressed_wrapper, self.statistics, wid, window, batch_config, self.auto_refresh_delay, - self.av_sync, self.av_sync_delay, + av_sync, av_sync_delay, self.video_helper, self.server_core_encodings, self.server_encodings, self.encoding, self.encodings, self.core_encodings, self.window_icon_encodings, self.encoding_options, self.icons_encoding_options, self.rgb_formats, self.default_encoding_options, - self.mmap, self.mmap_size, bandwidth_limit) + mmap, mmap_size, bandwidth_limit) self.window_sources[wid] = ws if len(self.window_sources)>1: #re-distribute bandwidth: