diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2018-05-07 12:22:54 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2018-05-15 10:36:55 +0200 |
commit | f31f9c1080d8907c95f1501c6abab038eceb5490 (patch) | |
tree | 9f16e082465c821b35d560f1e28988dfc3778dc3 /ui/vnc.h | |
parent | 4f4cb8282df82d43ba6b3c9045a3ac6fc4c4ef09 (diff) |
vnc: add magic cookie to VncState
Set magic cookie on initialization. Clear on cleanup. Sprinkle a bunch
of assert()s checking the cookie, to verify the pointer is valid.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180507102254.12107-1-kraxel@redhat.com
Diffstat (limited to 'ui/vnc.h')
-rw-r--r-- | ui/vnc.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -255,8 +255,11 @@ typedef enum { VNC_STATE_UPDATE_FORCE, } VncStateUpdate; +#define VNC_MAGIC ((uint64_t)0x05b3f069b3d204bb) + struct VncState { + uint64_t magic; QIOChannelSocket *sioc; /* The underlying socket */ QIOChannel *ioc; /* The channel currently used for I/O */ guint ioc_tag; |