Skip to content

Commit

Permalink
Wait for thread cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
kingk85 committed Mar 27, 2019
1 parent 1822494 commit 2a7ca60
Show file tree
Hide file tree
Showing 17 changed files with 4 additions and 4 deletions.
Binary file modified build/modules/auth.o
Binary file not shown.
Binary file modified build/modules/configRead.o
Binary file not shown.
Binary file modified build/modules/connection.o
Binary file not shown.
Binary file modified build/modules/daemon.o
Binary file not shown.
Binary file modified build/modules/dynamicMemory.o
Binary file not shown.
Binary file modified build/modules/dynamicVectors.o
Binary file not shown.
Binary file modified build/modules/errorHandling.o
Binary file not shown.
Binary file modified build/modules/fileManagement.o
Binary file not shown.
Binary file modified build/modules/ftpCommandElaborate.o
Binary file not shown.
Binary file modified build/modules/ftpData.o
Binary file not shown.
Binary file modified build/modules/ftpServer.o
Binary file not shown.
Binary file modified build/modules/logFunctions.o
Binary file not shown.
Binary file modified build/modules/openSsl.o
Binary file not shown.
Binary file modified build/modules/signals.o
Binary file not shown.
Binary file modified build/uFTP
Binary file not shown.
6 changes: 3 additions & 3 deletions ftpCommandElaborate.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ int parseCommandPasv(ftpDataType * data, int socketId)
{
printf("\nQuit command received the Pasv Thread has been cancelled!!!");
usleep(10000);
} while (ftpData->clients[socketId].workerData.threadIsAlive == 1);
} while (data->clients[socketId].workerData.threadIsAlive == 1);
}

if (data->clients[socketId].workerData.threadHasBeenCreated == 1)
Expand Down Expand Up @@ -542,7 +542,7 @@ int parseCommandPort(ftpDataType * data, int socketId)
{
printf("\nQuit command received the Pasv Thread has been cancelled!!!");
usleep(10000);
} while (ftpData->clients[socketId].workerData.threadIsAlive == 1);
} while (data->clients[socketId].workerData.threadIsAlive == 1);
}
if (data->clients[socketId].workerData.threadHasBeenCreated == 1)
{
Expand Down Expand Up @@ -580,7 +580,7 @@ int parseCommandAbor(ftpDataType * data, int socketId)
{
printf("\nQuit command received the Pasv Thread has been cancelled!!!");
usleep(10000);
} while (ftpData->clients[socketId].workerData.threadIsAlive == 1);
} while (data->clients[socketId].workerData.threadIsAlive == 1);
}

returnCode = socketPrintf(data, socketId, "s", "426 ABORT\r\n");
Expand Down
2 changes: 1 addition & 1 deletion ftpData.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ void resetClientData(ftpDataType *data, int clientId, int isInitialization)
{
printf("\nQuit command received the Pasv Thread has been cancelled!!!");
usleep(10000);
} while (ftpData->clients[clientId].workerData.threadIsAlive == 1);
} while (data->clients[clientId].workerData.threadIsAlive == 1);

}
pthread_mutex_destroy(&data->clients[clientId].conditionMutex);
Expand Down

0 comments on commit 2a7ca60

Please sign in to comment.