diff options
Diffstat (limited to 'libvncserver/main.c')
-rw-r--r-- | libvncserver/main.c | 16 |
1 files changed, 16 insertions, 0 deletions
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 */ |