summaryrefslogtreecommitdiffstats
path: root/libvncserver
diff options
context:
space:
mode:
authorrunge <runge>2006-10-11 23:47:40 +0000
committerrunge <runge>2006-10-11 23:47:40 +0000
commita255783ee09b15e1cae63a44b6494eeeebd540a9 (patch)
tree050d543a335805b3e8eda2f47c7b4a25b865b0dc /libvncserver
parente6152298e3ecb25b7ac560c5e56c5273e2464dff (diff)
downloadlibtdevnc-a255783ee09b15e1cae63a44b6494eeeebd540a9.tar.gz
libtdevnc-a255783ee09b15e1cae63a44b6494eeeebd540a9.zip
N_ENC_CAPS check does not work if libz is not present.
Diffstat (limited to 'libvncserver')
-rw-r--r--libvncserver/tightvnc-filetransfer/rfbtightserver.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libvncserver/tightvnc-filetransfer/rfbtightserver.c b/libvncserver/tightvnc-filetransfer/rfbtightserver.c
index cb9530f..d17f16c 100644
--- a/libvncserver/tightvnc-filetransfer/rfbtightserver.c
+++ b/libvncserver/tightvnc-filetransfer/rfbtightserver.c
@@ -237,7 +237,7 @@ rfbSendInteractionCaps(rfbClientPtr cl)
rfbCapabilityInfo smsg_list[N_SMSG_CAPS];
rfbCapabilityInfo cmsg_list[N_CMSG_CAPS];
rfbCapabilityInfo enc_list[N_ENC_CAPS];
- int i;
+ int i, n_enc_caps = N_ENC_CAPS;
/* Fill in the header structure sent prior to capability lists. */
intr_caps.nServerMessageTypes = Swap16IfLE(N_SMSG_CAPS);
@@ -286,6 +286,8 @@ rfbSendInteractionCaps(rfbClientPtr cl)
#ifdef LIBVNCSERVER_HAVE_LIBZ
SetCapInfo(&enc_list[i++], rfbEncodingZlib, rfbTridiaVncVendor);
SetCapInfo(&enc_list[i++], rfbEncodingTight, rfbTightVncVendor);
+#else
+ n_enc_caps -= 2;
#endif
SetCapInfo(&enc_list[i++], rfbEncodingCompressLevel0, rfbTightVncVendor);
SetCapInfo(&enc_list[i++], rfbEncodingQualityLevel0, rfbTightVncVendor);
@@ -293,7 +295,7 @@ rfbSendInteractionCaps(rfbClientPtr cl)
SetCapInfo(&enc_list[i++], rfbEncodingRichCursor, rfbTightVncVendor);
SetCapInfo(&enc_list[i++], rfbEncodingPointerPos, rfbTightVncVendor);
SetCapInfo(&enc_list[i++], rfbEncodingLastRect, rfbTightVncVendor);
- if (i != N_ENC_CAPS) {
+ if (i != n_enc_caps) {
rfbLog("rfbSendInteractionCaps: assertion failed, i != N_ENC_CAPS\n");
rfbCloseClient(cl);
return;