mirror of
https://github.com/kingk85/uFTP.git
synced 2025-07-14 15:56:16 +03:00
removed double clean worker data
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
build/uFTP
BIN
build/uFTP
Binary file not shown.
@ -1399,7 +1399,7 @@ long long int writeRetrFile(ftpDataType * data, int theSocketId, long long int s
|
||||
if (writtenSize <= 0)
|
||||
{
|
||||
|
||||
printf("\nError %d while writing retr file.");
|
||||
printf("\nError %d while writing retr file.", writtenSize);
|
||||
fclose(retrFP);
|
||||
retrFP = NULL;
|
||||
return -1;
|
||||
|
@ -568,6 +568,7 @@ void deleteListDataInfoVector(DYNV_VectorGenericDataType *theVector)
|
||||
void resetWorkerData(ftpDataType *data, int clientId, int isInitialization)
|
||||
{
|
||||
|
||||
printf("\nReset of worker id: %d", clientId);
|
||||
data->clients[clientId].workerData.connectionPort = 0;
|
||||
data->clients[clientId].workerData.passiveModeOn = 0;
|
||||
data->clients[clientId].workerData.socketIsConnected = 0;
|
||||
|
@ -192,8 +192,9 @@ int socketPrintf(ftpDataType * ftpData, int clientId, const char *__restrict __f
|
||||
}
|
||||
va_end(args);
|
||||
|
||||
if (ftpData->clients[clientId].socketIsConnected != 1)
|
||||
return 0;
|
||||
if (ftpData->clients[clientId].socketIsConnected != 1 ||
|
||||
ftpData->clients[clientId].socketDescriptor == 0)
|
||||
return -1;
|
||||
|
||||
if (ftpData->clients[clientId].tlsIsEnabled != 1)
|
||||
{
|
||||
@ -638,7 +639,7 @@ void closeSocket(ftpDataType * ftpData, int processingSocket)
|
||||
theReturnCode = close(ftpData->clients[processingSocket].socketDescriptor);
|
||||
|
||||
resetClientData(ftpData, processingSocket, 0);
|
||||
resetWorkerData(ftpData, processingSocket, 0);
|
||||
//resetWorkerData(ftpData, processingSocket, 0);
|
||||
|
||||
//Update client connecteds
|
||||
ftpData->connectedClients--;
|
||||
|
Reference in New Issue
Block a user