diff options
author | dscho <dscho> | 2005-10-03 14:40:18 +0000 |
---|---|---|
committer | dscho <dscho> | 2005-10-03 14:40:18 +0000 |
commit | 8490de3ff0e488233d7047d7e6ba3b5c278c5484 (patch) | |
tree | ec7395a2942fb1aa37a66240f86f473a68f87ef6 /libvncserver/rfbserver.c | |
parent | 1a20edd73f930424b658b7bedfbe4dd653cdf06c (diff) | |
download | libtdevnc-8490de3ff0e488233d7047d7e6ba3b5c278c5484.tar.gz libtdevnc-8490de3ff0e488233d7047d7e6ba3b5c278c5484.zip |
add enablePseudoEncoding() to rfbProtocolExtension
Diffstat (limited to 'libvncserver/rfbserver.c')
-rw-r--r-- | libvncserver/rfbserver.c | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c index 0c25f80..4b67aa1 100644 --- a/libvncserver/rfbserver.c +++ b/libvncserver/rfbserver.c @@ -105,7 +105,7 @@ rfbClientListInit(rfbScreenInfoPtr rfbScreen) { if(sizeof(rfbBool)!=1) { /* a sanity check */ - fprintf(stderr,"rfbBool's size is not 1 (%d)!\n",sizeof(rfbBool)); + fprintf(stderr,"rfbBool's size is not 1 (%d)!\n",(int)sizeof(rfbBool)); /* we cannot continue, because rfbBool is supposed to be char everywhere */ exit(1); } @@ -924,8 +924,22 @@ rfbProcessClientNormalMessage(rfbClientPtr cl) #endif } else #endif - rfbLog("rfbProcessClientNormalMessage: ignoring unknown " - "encoding type %d\n", (int)enc); + { + rfbExtensionData* e; + for(e = cl->extensions; e;) { + rfbExtensionData* next = e->next; + if(e->extension->enablePseudoEncoding && + e->extension->enablePseudoEncoding(cl, + e->data, (int)enc)) + /* ext handles this encoding */ + break; + e = next; + } + if(e == NULL) + rfbLog("rfbProcessClientNormalMessage: ignoring" + "unknown encoding type %d\n", + (int)enc); + } } } @@ -1071,12 +1085,15 @@ rfbProcessClientNormalMessage(rfbClientPtr cl) default: { - rfbExtensionData* extension; + rfbExtensionData *e,*next; - for(extension=cl->extensions; extension; extension=extension->next) - if(extension->extension->handleMessage && - extension->extension->handleMessage(cl, extension->data, &msg)) + for(e=cl->extensions; e;) { + next = e->next; + if(e->extension->handleMessage && + e->extension->handleMessage(cl, e->data, &msg)) return; + e = next; + } if(cl->screen->processCustomClientMessage(cl,msg.type)) { rfbLog("Warning: this program uses processCustomClientMessage, " |