summaryrefslogtreecommitdiffstats
path: root/libvncserver/rfbserver.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvncserver/rfbserver.c')
-rw-r--r--libvncserver/rfbserver.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c
index 53e8cfb..aec12cd 100644
--- a/libvncserver/rfbserver.c
+++ b/libvncserver/rfbserver.c
@@ -1310,10 +1310,11 @@ rfbBool rfbSendFileTransferChunk(rfbClientPtr cl)
/*
* Don't close the client if we get into this one because
* it is called from many places to service file transfers.
+ * Note that permitFileTransfer is checked first.
*/
- if ((cl->screen->getFileTransferPermission != NULL
- && cl->screen->getFileTransferPermission(cl) != TRUE)
- || cl->screen->permitFileTransfer != TRUE) {
+ if (cl->screen->permitFileTransfer != TRUE ||
+ (cl->screen->getFileTransferPermission != NULL
+ && cl->screen->getFileTransferPermission(cl) != TRUE)) {
return TRUE;
}