mirror of
https://github.com/kingk85/uFTP.git
synced 2025-08-01 14:27:32 +03:00
resolving conflicts
This commit is contained in:
@ -499,22 +499,14 @@ int parseCommandPort(ftpDataType * data, int socketId)
|
|||||||
returnCode = snprintf(data->clients[socketId].workerData.activeIpAddress, CLIENT_BUFFER_STRING_SIZE, "%d.%d.%d.%d", ipAddressBytes[0],ipAddressBytes[1],ipAddressBytes[2],ipAddressBytes[3]);
|
returnCode = snprintf(data->clients[socketId].workerData.activeIpAddress, CLIENT_BUFFER_STRING_SIZE, "%d.%d.%d.%d", ipAddressBytes[0],ipAddressBytes[1],ipAddressBytes[2],ipAddressBytes[3]);
|
||||||
|
|
||||||
void *pReturn;
|
void *pReturn;
|
||||||
//if (data->clients[socketId].workerData.threadIsAlive == 1)
|
if (data->clients[socketId].workerData.threadIsAlive == 1)
|
||||||
//{
|
{
|
||||||
returnCode = pthread_cancel(data->clients[socketId].workerData.workerThread);
|
returnCode = pthread_cancel(data->clients[socketId].workerData.workerThread);
|
||||||
<<<<<<< HEAD
|
|
||||||
//}
|
|
||||||
returnCode = pthread_join(data->clients[socketId].workerData.workerThread, &pReturn);
|
|
||||||
=======
|
|
||||||
}
|
}
|
||||||
if (data->clients[socketId].workerData.threadHasBeenCreated == 1)
|
if (data->clients[socketId].workerData.threadHasBeenCreated == 1)
|
||||||
{
|
{
|
||||||
returnCode = pthread_join(data->clients[socketId].workerData.workerThread, &pReturn);
|
returnCode = pthread_join(data->clients[socketId].workerData.workerThread, &pReturn);
|
||||||
<<<<<<< HEAD
|
|
||||||
}
|
}
|
||||||
=======
|
|
||||||
>>>>>>> cd589876b02918418d1253f35b68349522f82294
|
|
||||||
>>>>>>> a36f2a8ba89a857bd0a379b4f2f1931be56579d0
|
|
||||||
data->clients[socketId].workerData.passiveModeOn = 0;
|
data->clients[socketId].workerData.passiveModeOn = 0;
|
||||||
data->clients[socketId].workerData.activeModeOn = 1;
|
data->clients[socketId].workerData.activeModeOn = 1;
|
||||||
returnCode = pthread_create(&data->clients[socketId].workerData.workerThread, NULL, connectionWorkerHandle, (void *) &data->clients[socketId].clientProgressiveNumber);
|
returnCode = pthread_create(&data->clients[socketId].workerData.workerThread, NULL, connectionWorkerHandle, (void *) &data->clients[socketId].clientProgressiveNumber);
|
||||||
@ -541,15 +533,10 @@ int parseCommandAbor(ftpDataType * data, int socketId)
|
|||||||
if (data->clients[socketId].workerData.threadIsAlive == 1)
|
if (data->clients[socketId].workerData.threadIsAlive == 1)
|
||||||
{
|
{
|
||||||
void *pReturn;
|
void *pReturn;
|
||||||
//if (data->clients[socketId].workerData.threadIsAlive == 1)
|
if (data->clients[socketId].workerData.threadIsAlive == 1)
|
||||||
//{
|
{
|
||||||
pthread_cancel(data->clients[socketId].workerData.workerThread);
|
pthread_cancel(data->clients[socketId].workerData.workerThread);
|
||||||
<<<<<<< HEAD
|
|
||||||
//}
|
|
||||||
pthread_join(data->clients[socketId].workerData.workerThread, &pReturn);
|
|
||||||
=======
|
|
||||||
}
|
}
|
||||||
>>>>>>> cd589876b02918418d1253f35b68349522f82294
|
|
||||||
|
|
||||||
returnCode = socketPrintf(data, socketId, "s", "426 ABORT\r\n");
|
returnCode = socketPrintf(data, socketId, "s", "426 ABORT\r\n");
|
||||||
if (returnCode <= 0)
|
if (returnCode <= 0)
|
||||||
|
22
ftpData.c
22
ftpData.c
@ -639,38 +639,16 @@ void resetClientData(ftpDataType *data, int clientId, int isInitialization)
|
|||||||
|
|
||||||
if (isInitialization != 1)
|
if (isInitialization != 1)
|
||||||
{
|
{
|
||||||
<<<<<<< HEAD
|
|
||||||
if (data->clients[clientId].workerData.threadIsAlive == 1)
|
|
||||||
{
|
|
||||||
void *pReturn;
|
|
||||||
pthread_cancel(data->clients[clientId].workerData.workerThread);
|
|
||||||
pthread_join(data->clients[clientId].workerData.workerThread, &pReturn);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
void *pReturn = NULL;
|
|
||||||
pthread_cancel(data->clients[clientId].workerData.workerThread);
|
|
||||||
pthread_join(data->clients[clientId].workerData.workerThread, &pReturn);
|
|
||||||
}
|
|
||||||
=======
|
|
||||||
void *pReturn;
|
void *pReturn;
|
||||||
if (data->clients[clientId].workerData.threadIsAlive == 1)
|
if (data->clients[clientId].workerData.threadIsAlive == 1)
|
||||||
pthread_cancel(data->clients[clientId].workerData.workerThread);
|
pthread_cancel(data->clients[clientId].workerData.workerThread);
|
||||||
>>>>>>> cd589876b02918418d1253f35b68349522f82294
|
|
||||||
|
|
||||||
pthread_mutex_destroy(&data->clients[clientId].writeMutex);
|
pthread_mutex_destroy(&data->clients[clientId].writeMutex);
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
#ifdef OPENSSL_ENABLED
|
|
||||||
SSL_free(data->clients[clientId].ssl);
|
|
||||||
SSL_free(data->clients[clientId].workerData.ssl);
|
|
||||||
#endif
|
|
||||||
=======
|
|
||||||
#ifdef OPENSSL_ENABLED
|
#ifdef OPENSSL_ENABLED
|
||||||
SSL_free(data->clients[clientId].ssl);
|
SSL_free(data->clients[clientId].ssl);
|
||||||
//SSL_free(data->clients[clientId].workerData.ssl);
|
//SSL_free(data->clients[clientId].workerData.ssl);
|
||||||
#endif
|
#endif
|
||||||
>>>>>>> cd589876b02918418d1253f35b68349522f82294
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pthread_mutex_init(&data->clients[clientId].writeMutex, NULL) != 0)
|
if (pthread_mutex_init(&data->clients[clientId].writeMutex, NULL) != 0)
|
||||||
|
@ -571,7 +571,7 @@ void runFtpServer(void)
|
|||||||
//Debug print errors
|
//Debug print errors
|
||||||
if (ftpData.clients[processingSock].bufferIndex < 0)
|
if (ftpData.clients[processingSock].bufferIndex < 0)
|
||||||
{
|
{
|
||||||
//ftpData.clients[processingSock].closeTheClient = 1;
|
ftpData.clients[processingSock].closeTheClient = 1;
|
||||||
printf("\n1 Errno = %d", errno);
|
printf("\n1 Errno = %d", errno);
|
||||||
perror("1 Error: ");
|
perror("1 Error: ");
|
||||||
continue;
|
continue;
|
||||||
|
@ -460,15 +460,6 @@ void closeClient(ftpDataType * ftpData, int processingSocket)
|
|||||||
{
|
{
|
||||||
printf("\nQUIT FLAG SET!\n");
|
printf("\nQUIT FLAG SET!\n");
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
// if (ftpData->clients[processingSocket].workerData.threadIsAlive == 1)
|
|
||||||
// {
|
|
||||||
void *pReturn;
|
|
||||||
pthread_cancel(ftpData->clients[processingSocket].workerData.workerThread);
|
|
||||||
pthread_join(ftpData->clients[processingSocket].workerData.workerThread, &pReturn);
|
|
||||||
printf("\nQuit command received the Pasv Thread has been cancelled.");
|
|
||||||
// }
|
|
||||||
=======
|
|
||||||
if (ftpData->clients[processingSocket].workerData.threadIsAlive == 1)
|
if (ftpData->clients[processingSocket].workerData.threadIsAlive == 1)
|
||||||
{
|
{
|
||||||
void *pReturn;
|
void *pReturn;
|
||||||
@ -476,7 +467,6 @@ void closeClient(ftpDataType * ftpData, int processingSocket)
|
|||||||
//pthread_join(ftpData->clients[processingSocket].workerData.workerThread, &pReturn);
|
//pthread_join(ftpData->clients[processingSocket].workerData.workerThread, &pReturn);
|
||||||
printf("\nQuit command received the Pasv Thread has been cancelled.");
|
printf("\nQuit command received the Pasv Thread has been cancelled.");
|
||||||
}
|
}
|
||||||
>>>>>>> cd589876b02918418d1253f35b68349522f82294
|
|
||||||
|
|
||||||
FD_CLR(ftpData->clients[processingSocket].socketDescriptor, &ftpData->connectionData.rsetAll);
|
FD_CLR(ftpData->clients[processingSocket].socketDescriptor, &ftpData->connectionData.rsetAll);
|
||||||
FD_CLR(ftpData->clients[processingSocket].socketDescriptor, &ftpData->connectionData.wsetAll);
|
FD_CLR(ftpData->clients[processingSocket].socketDescriptor, &ftpData->connectionData.wsetAll);
|
||||||
|
Reference in New Issue
Block a user