Wait for thread cancel

This commit is contained in:
Ugo Cirmignani
2019-03-27 22:00:31 +01:00
parent d7d2323e16
commit ad3abc2a20
17 changed files with 4 additions and 4 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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)
@ -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)
{
@ -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");

View File

@ -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);