summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Beier <dontmind@freeshell.org>2018-10-22 00:39:50 +0200
committerChristian Beier <dontmind@freeshell.org>2018-10-22 00:40:53 +0200
commit2d939267a176bf4976dbad36399638956ad8cc34 (patch)
treeff110b3e3340b984f2c0952371aa91dce7a394c8
parent73cb96fec028a576a5a24417b57723b55854ad7b (diff)
downloadlibtdevnc-2d939267a176bf4976dbad36399638956ad8cc34.tar.gz
libtdevnc-2d939267a176bf4976dbad36399638956ad8cc34.zip
tightvnc-filetransfer: when creating a new download thread, make sure the previous one ends
re #242
-rw-r--r--libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c b/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c
index 31163d0..70e105f 100644
--- a/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c
+++ b/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c
@@ -517,8 +517,7 @@ HandleFileDownload(rfbClientPtr cl, rfbTightClientPtr rtcp)
FreeFileTransferMsg(fileDownloadMsg);
return;
}
- rtcp->rcft.rcfd.downloadInProgress = FALSE;
- rtcp->rcft.rcfd.downloadFD = -1;
+ CloseUndoneFileDownload(cl, rtcp);
if(pthread_create(&rtcp->rcft.rcfd.downloadThread, NULL, RunFileDownloadThread, (void*)
cl) != 0) {