From eb08d83d62d0440b946b1b13fcbabb12314dbba9 Mon Sep 17 00:00:00 2001 From: rohit_99129 Date: Fri, 24 Feb 2006 08:23:55 +0000 Subject: Added method to get extension specific client data --- libvncserver/main.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'libvncserver/main.c') diff --git a/libvncserver/main.c b/libvncserver/main.c index bf14062..6cf21ea 100644 --- a/libvncserver/main.c +++ b/libvncserver/main.c @@ -194,6 +194,22 @@ rfbBool rfbDisableExtension(rfbClientPtr cl, rfbProtocolExtension* extension) return FALSE; } +void* rfbGetExtensionClientData(rfbClientPtr cl, rfbExtensionData* extension) +{ + rfbExtensionData* data = cl->extensions; + + while(data && data->extension != extension) + data = data->next; + + if(data == NULL) { + rfbLog("Extension is not enabled !\n"); + /* rfbCloseClient(cl); */ + return NULL; + } + + return data->data; +} + /* * Logging */ -- cgit v1.2.1