From 1c3af68549c544de065ceedec518449ee8cff49d Mon Sep 17 00:00:00 2001 From: steven_carr Date: Mon, 15 May 2006 18:17:31 +0000 Subject: Default to RFB 3.8, add command line option to specify the RFB version. --- libvncserver/rfbserver.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'libvncserver/rfbserver.c') diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c index ab4e04f..d3d4409 100644 --- a/libvncserver/rfbserver.c +++ b/libvncserver/rfbserver.c @@ -1589,8 +1589,20 @@ rfbBool rfbProcessFileTransfer(rfbClientPtr cl, uint8_t contentType, uint8_t con return rfbSendFileTransferMessage(cl, rfbFileTransferAccess, 0, -1 , 0, ""); /* Deny */ } } - rfbLog("rfbProcessFileTransfer() File Transfer Permission DENIED by default!\n"); - return rfbSendFileTransferMessage(cl, rfbFileTransferAccess, 0, -1 , 0, ""); /* DEFAULT: DENY (for security) */ + else + { + if (cl->screen->permitFileTransfer) + { + rfbLog("rfbProcessFileTransfer() File Transfer Permission Granted!\n"); + return rfbSendFileTransferMessage(cl, rfbFileTransferAccess, 0, 1 , 0, ""); /* Permit */ + } + else + { + rfbLog("rfbProcessFileTransfer() File Transfer Permission DENIED by default!\n"); + return rfbSendFileTransferMessage(cl, rfbFileTransferAccess, 0, -1 , 0, ""); /* DEFAULT: DENY (for security) */ + } + + } } break; -- cgit v1.2.1