mirror of
https://github.com/kingk85/uFTP.git
synced 2025-04-12 10:48:40 +03:00
debug print
This commit is contained in:
@ -503,11 +503,12 @@ int parseCommandPasv(ftpDataType *data, int socketId)
|
||||
data->clients[socketId].workerData.passiveModeOn = 1;
|
||||
data->clients[socketId].workerData.extendedPassiveModeOn = 0;
|
||||
data->clients[socketId].workerData.activeModeOn = 0;
|
||||
|
||||
returnCode = pthread_create(&data->clients[socketId].workerData.workerThread, NULL, connectionWorkerHandle, (void *)&data->clients[socketId].clientProgressiveNumber);
|
||||
|
||||
if (returnCode != 0)
|
||||
{
|
||||
// my_printf("\nError in pthread_create %d", returnCode);
|
||||
my_printf("\nError in pthread_create %d", returnCode);
|
||||
return FTP_COMMAND_PROCESSED_WRITE_ERROR;
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,7 @@ void *connectionWorkerHandle(void * socketId)
|
||||
ftpData.clients[theSocketId].workerData.threadHasBeenCreated = 1;
|
||||
int returnCode;
|
||||
|
||||
//my_printf("\nWORKER CREATED!");
|
||||
my_printf("\nWORKER CREATED!");
|
||||
|
||||
//Passive data connection mode
|
||||
if (ftpData.clients[theSocketId].workerData.passiveModeOn == 1)
|
||||
@ -150,7 +150,7 @@ void *connectionWorkerHandle(void * socketId)
|
||||
if (ftpData.clients[theSocketId].workerData.passiveListeningSocket == -1)
|
||||
{
|
||||
ftpData.clients[theSocketId].closeTheClient = 1;
|
||||
//my_printf("\n Closing the client 1");
|
||||
my_printf("\n Closing the client 1");
|
||||
pthread_exit(NULL);
|
||||
}
|
||||
|
||||
@ -163,13 +163,14 @@ void *connectionWorkerHandle(void * socketId)
|
||||
else
|
||||
{
|
||||
returnCode = -1;
|
||||
my_printf("\nUnknown passive state, should be PASV or EPSV");
|
||||
perror("Unknown passive state, should be PASV or EPSV");
|
||||
}
|
||||
|
||||
if (returnCode <= 0)
|
||||
{
|
||||
ftpData.clients[theSocketId].closeTheClient = 1;
|
||||
//my_printf("\n Closing the client 2");
|
||||
my_printf("\n Closing the client 2");
|
||||
pthread_exit(NULL);
|
||||
}
|
||||
|
||||
@ -211,6 +212,8 @@ void *connectionWorkerHandle(void * socketId)
|
||||
pthread_exit(NULL);
|
||||
}
|
||||
}
|
||||
else
|
||||
my_printf("\n Socket already connected");
|
||||
}
|
||||
else if (ftpData.clients[theSocketId].workerData.activeModeOn == 1)
|
||||
{
|
||||
|
Reference in New Issue
Block a user