xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Ticket #1409: dump-mmap-area.patch

File dump-mmap-area.patch, 1.1 KB (added by Antoine Martin, 4 years ago)

always dump mmap area from client when server sends hello

  • xpra/client/ui_client_base.py

     
    17721772            mmap_token_index = c.intget("mmap_token_index", 512)
    17731773            from xpra.net.mmap_pipe import read_mmap_token
    17741774            token = read_mmap_token(self.mmap, mmap_token_index)
    1775             if token!=mmap_token:
     1775            if token!=mmap_token or True:
    17761776                log.error("Error: mmap token verification failed!")
    17771777                log.error(" expected '%s'", mmap_token)
    17781778                log.error(" found '%s'", token)
    17791779                self.mmap_enabled = False
     1780                import ctypes
     1781                arraytype = ctypes.c_char * self.mmap_size
     1782                v = arraytype.from_buffer(self.mmap, 0)
     1783                with open("mmap-dump", "wb") as f:
     1784                    f.write(v)
    17801785                self.quit(EXIT_MMAP_TOKEN_FAILURE)
    17811786                return
    17821787            log.info("enabled fast mmap transfers using %sB shared memory area", std_unit(self.mmap_size, unit=1024))