diff options
author | dscho <dscho> | 2005-10-06 18:51:56 +0000 |
---|---|---|
committer | dscho <dscho> | 2005-10-06 18:51:56 +0000 |
commit | 60f1770e1081e81502dc2ba000c27f730f5c1e7c (patch) | |
tree | 3ba360d24fbe6b087c9f526760f3fa23c094df5a /libvncserver | |
parent | 354d3c9a92624813ec934d5a9b6870763f445477 (diff) | |
download | libtdevnc-60f1770e1081e81502dc2ba000c27f730f5c1e7c.tar.gz libtdevnc-60f1770e1081e81502dc2ba000c27f730f5c1e7c.zip |
provide a list of the pseudo encodings understood by the extension
Diffstat (limited to 'libvncserver')
-rw-r--r-- | libvncserver/rfbserver.c | 41 | ||||
-rw-r--r-- | libvncserver/tightvnc-filetransfer/rfbtightserver.c | 1 |
2 files changed, 38 insertions, 4 deletions
diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c index 4b67aa1..53ec4f8 100644 --- a/libvncserver/rfbserver.c +++ b/libvncserver/rfbserver.c @@ -935,10 +935,43 @@ rfbProcessClientNormalMessage(rfbClientPtr cl) break; e = next; } - if(e == NULL) - rfbLog("rfbProcessClientNormalMessage: ignoring" - "unknown encoding type %d\n", - (int)enc); + if(e == NULL) { + rfbBool handled = FALSE; + /* if the pseudo encoding is not handled by the + enabled extensions, search through all + extensions. */ + rfbProtocolExtension* e; + + for(e = rfbGetExtensionIterator(); e;) { + int* encs = e->pseudoEncodings; + while(encs && *encs!=0) { + if(*encs==(int)enc) { + void* data = NULL; + if(e->newClient) + e->newClient(cl, &data); + if(!e->enablePseudoEncoding(cl, data, (int)enc)) { + rfbLog("Installed extension pretends to handle pseudo encoding 0x%x, but does not!\n",(int)enc); + } else { + rfbEnableExtension(cl, e, data); + handled = TRUE; + e = NULL; + break; + } + } + encs++; + } + rfbReleaseExtensionIterator(); + + + if(e) + e = e->next; + } + + if(!handled) + rfbLog("rfbProcessClientNormalMessage: ignoring" + " unknown encoding type %d\n", + (int)enc); + } } } } diff --git a/libvncserver/tightvnc-filetransfer/rfbtightserver.c b/libvncserver/tightvnc-filetransfer/rfbtightserver.c index 013aa2e..9d89de1 100644 --- a/libvncserver/tightvnc-filetransfer/rfbtightserver.c +++ b/libvncserver/tightvnc-filetransfer/rfbtightserver.c @@ -485,6 +485,7 @@ rfbProtocolExtension tightVncFileTransferExtension = { NULL, rfbTightExtensionInit, NULL, + NULL, rfbTightExtensionMsgHandler, rfbTightExtensionClientClose, rfbTightUsage, |