mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
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
This commit is contained in:
parent
4f4cb8282d
commit
f31f9c1080
3 changed files with 16 additions and 1 deletions
3
ui/vnc.h
3
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue