aboutsummaryrefslogtreecommitdiff
path: root/ui/vnc.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2018-05-07 12:22:54 +0200
committerGerd Hoffmann <kraxel@redhat.com>2018-05-15 10:36:55 +0200
commitf31f9c1080d8907c95f1501c6abab038eceb5490 (patch)
tree9f16e082465c821b35d560f1e28988dfc3778dc3 /ui/vnc.h
parent4f4cb8282df82d43ba6b3c9045a3ac6fc4c4ef09 (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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/vnc.h b/ui/vnc.h
index 7b29def77d..762632929b 100644
--- a/ui/vnc.h
+++ b/ui/vnc.h
@@ -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;