Skip to content
Snippets Groups Projects
Commit 1dd6389d authored by rswindell's avatar rswindell
Browse files

Eliminated race condition at end of ctrl_thread if xfer_thread is still...

Eliminated race condition at end of ctrl_thread if xfer_thread is still running caused protection faults.
parent 33462fb6
No related branches found
No related tags found
No related merge requests found
...@@ -1397,7 +1397,7 @@ static void send_thread(void* arg) ...@@ -1397,7 +1397,7 @@ static void send_thread(void* arg)
break; break;
} }
total+=wr; total+=wr;
*xfer.lastactive=time(NULL); /* exception here */ *xfer.lastactive=time(NULL);
mswait(1); mswait(1);
} }
...@@ -4016,7 +4016,8 @@ static void ctrl_thread(void* arg) ...@@ -4016,7 +4016,8 @@ static void ctrl_thread(void* arg)
if(transfer_inprogress==TRUE) { if(transfer_inprogress==TRUE) {
lprintf("%04d Waiting for transfer to complete...",sock); lprintf("%04d Waiting for transfer to complete...",sock);
while(data_sock!=INVALID_SOCKET && transfer_inprogress==TRUE) { while(/* data_sock!=INVALID_SOCKET && removed SEP-16-2001 */
transfer_inprogress==TRUE) {
mswait(500); mswait(500);
if(gettimeleft(&scfg,&user,logintime)<1) { if(gettimeleft(&scfg,&user,logintime)<1) {
lprintf("%04d Out of time, disconnecting",sock); lprintf("%04d Out of time, disconnecting",sock);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment