From 380282b07dcc262f011aa665972dacba5d2178bc Mon Sep 17 00:00:00 2001 From: Corentin Chary Date: Wed, 19 May 2010 09:24:10 +0200 Subject: vnc: add basic tight support Add support for tight encoding [1]. This patch only add support for "basic" tight compression without any filter. [1] http://tigervnc.org/cgi-bin/rfbproto#tight-encoding. Signed-off-by: Corentin Chary Signed-off-by: Anthony Liguori --- vnc-encoding-zlib.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'vnc-encoding-zlib.c') diff --git a/vnc-encoding-zlib.c b/vnc-encoding-zlib.c index 88ac863..a99bc38 100644 --- a/vnc-encoding-zlib.c +++ b/vnc-encoding-zlib.c @@ -28,7 +28,7 @@ #define ZALLOC_ALIGNMENT 16 -static void *zalloc(void *x, unsigned items, unsigned size) +void *vnc_zlib_zalloc(void *x, unsigned items, unsigned size) { void *p; @@ -40,7 +40,7 @@ static void *zalloc(void *x, unsigned items, unsigned size) return (p); } -static void zfree(void *x, void *addr) +void vnc_zlib_zfree(void *x, void *addr) { qemu_free(addr); } @@ -72,8 +72,8 @@ static int vnc_zlib_stop(VncState *vs) VNC_DEBUG("VNC: initializing zlib stream\n"); VNC_DEBUG("VNC: opaque = %p | vs = %p\n", zstream->opaque, vs); - zstream->zalloc = zalloc; - zstream->zfree = zfree; + zstream->zalloc = vnc_zlib_zalloc; + zstream->zfree = vnc_zlib_zfree; err = deflateInit2(zstream, vs->tight_compression, Z_DEFLATED, MAX_WBITS, MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY); -- cgit v1.1