Skip to content

Commit

Permalink
#1761: support mmap prefix in caps
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@18511 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Feb 21, 2018
1 parent f0c9f32 commit 34204e1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/xpra/server/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,10 +888,10 @@ def parse_encoding_caps(self, c, min_mmap_size):
elog("default encoding options: %s", self.default_encoding_options)
self.auto_refresh_delay = c.intget("auto_refresh_delay", 0)
#mmap:
mmap_filename = c.strget("mmap_file")
mmap_size = c.intget("mmap_size", 0)
mmap_filename = c.strget("mmap_file") or c.strget("mmap.file")
mmap_size = c.intget("mmap_size", 0) or c.intget("mmap.size")
mmaplog("client supplied mmap_file=%s", mmap_filename)
mmap_token = c.intget("mmap_token")
mmap_token = c.intget("mmap_token") or c.intget("mmap.token")
mmaplog("mmap supported=%s, token=%s", self.supports_mmap, mmap_token)
if mmap_filename:
if self.mmap_filename:
Expand All @@ -908,8 +908,8 @@ def parse_encoding_caps(self, c, min_mmap_size):
self.mmap, self.mmap_size = init_server_mmap(mmap_filename, mmap_size)
mmaplog("found client mmap area: %s, %i bytes - min mmap size=%i", self.mmap, self.mmap_size, min_mmap_size)
if self.mmap_size>0:
index = c.intget("mmap_token_index", DEFAULT_TOKEN_INDEX)
count = c.intget("mmap_token_bytes", DEFAULT_TOKEN_BYTES)
index = c.intget("mmap_token_index", DEFAULT_TOKEN_INDEX) or c.intget("mmap.token_index", DEFAULT_TOKEN_INDEX)
count = c.intget("mmap_token_bytes", DEFAULT_TOKEN_BYTES) or c.intget("mmap.token_bytes", DEFAULT_TOKEN_BYTES)
v = read_mmap_token(self.mmap, index, count)
mmaplog("mmap_token=%#x, verification=%#x", mmap_token, v)
if v!=mmap_token:
Expand Down

0 comments on commit 34204e1

Please sign in to comment.