tightvnc-filetransfer: tie the download thread to the control structure

re #242
pull/3/head
Christian Beier 6 years ago
parent ca2a5ac02f
commit 89419fb1a0
No known key found for this signature in database
GPG Key ID: 421BB3B45C6067F8

@ -508,7 +508,6 @@ RunFileDownloadThread(void* client)
void void
HandleFileDownload(rfbClientPtr cl, rfbTightClientPtr rtcp) HandleFileDownload(rfbClientPtr cl, rfbTightClientPtr rtcp)
{ {
pthread_t fileDownloadThread;
FileTransferMsg fileDownloadMsg; FileTransferMsg fileDownloadMsg;
memset(&fileDownloadMsg, 0, sizeof(FileTransferMsg)); memset(&fileDownloadMsg, 0, sizeof(FileTransferMsg));
@ -521,7 +520,7 @@ HandleFileDownload(rfbClientPtr cl, rfbTightClientPtr rtcp)
rtcp->rcft.rcfd.downloadInProgress = FALSE; rtcp->rcft.rcfd.downloadInProgress = FALSE;
rtcp->rcft.rcfd.downloadFD = -1; rtcp->rcft.rcfd.downloadFD = -1;
if(pthread_create(&fileDownloadThread, NULL, RunFileDownloadThread, (void*) if(pthread_create(&rtcp->rcft.rcfd.downloadThread, NULL, RunFileDownloadThread, (void*)
cl) != 0) { cl) != 0) {
FileTransferMsg ftm = GetFileDownLoadErrMsg(); FileTransferMsg ftm = GetFileDownLoadErrMsg();

@ -148,6 +148,7 @@ typedef struct _rfbClientFileDownload {
int downloadInProgress; int downloadInProgress;
unsigned long mTime; unsigned long mTime;
int downloadFD; int downloadFD;
pthread_t downloadThread;
} rfbClientFileDownload ; } rfbClientFileDownload ;
typedef struct _rfbClientFileUpload { typedef struct _rfbClientFileUpload {

Loading…
Cancel
Save