Skip to content

Commit

Permalink
Merge pull request #15 from hfiref0x/dev
Browse files Browse the repository at this point in the history
Move patch to master
  • Loading branch information
hfiref0x authored Apr 4, 2019
2 parents 6b9fca9 + 344205a commit 5980ea1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Source.sha256
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
8214f7f15adb8eab19a336b9e867ce35c2cc11317c6b8b612204e90a1ab9ccd8 *Source\cfgparse.h
8925cd669e8c4b3696d27e8fa98c9e20010e7058c685aecf50669a4190383bb6 *Source\changelog.txt
5f60ff45d21faa296673f793d6afef8a0c2c9b97a7b0aa51134750f7158f15c2 *Source\fftp.conf
1112530cc1c0c74225ade22f6c4204905743dbc1546951581d16a8adacec6560 *Source\ftpserv.c
44f52ba4091e99b60e06fad1c973ce95012c274eaa3bc0010d589540e3f264bc *Source\ftpserv.c
de11d783b7cdea34ef90eca2f957333cf17485b537fd9a4d6b24a8d9f357d82f *Source\ftpserv.h
8dc0b4a40e2bac991a7d878aa80d53d9bf175b739a6c591e9401a77b285fca1c *Source\main.c
31f77f2c56d71b285cb689af8e7400602af0adaf0df8cfe3bc9ae57a1e79c5f1 *Source\x_malloc.c
Expand Down
20 changes: 15 additions & 5 deletions Source/ftpserv.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Created on: Aug 20, 2016
*
* Modified on: Feb 04, 2019
* Modified on: Apr 04, 2019
*
* Author: lightftp
*/
Expand Down Expand Up @@ -405,6 +405,7 @@ void WorkerThreadCleanup(PFTPCONTEXT context)

context->DataIPv4 = 0;
context->DataPort = 0;
//writelogentry(context, "WorkerThreadCleanup complete", "");
}

int ftpUSER(PFTPCONTEXT context, const char *params)
Expand All @@ -417,12 +418,16 @@ int ftpUSER(PFTPCONTEXT context, const char *params)
/*
* Save username in GPBuffer for next PASS command
*/
strcpy(context->GPBuffer, params);

writelogentry(context, " USER: ", (char *)params);
sendstring(context, interm331);
sendstring(context, params);
return sendstring(context, interm331_tail);

strcpy(context->GPBuffer, interm331);
strcat(context->GPBuffer, params);
strcat(context->GPBuffer, interm331_tail);
sendstring(context, context->GPBuffer);

strcpy(context->GPBuffer, params);
return 1;
}

int ftpQUIT(PFTPCONTEXT context, const char *params)
Expand Down Expand Up @@ -692,6 +697,7 @@ void *list_thread(PFTPCONTEXT context)
sendstring(context, error426);

close(clientsocket);
context->DataSocket = INVALID_SOCKET;
}

context->WorkerThreadValid = -1;
Expand Down Expand Up @@ -893,6 +899,7 @@ void *retr_thread(PFTPCONTEXT context)
sendstring(context, error426);

close(clientsocket);
context->DataSocket = INVALID_SOCKET;
}

context->WorkerThreadValid = -1;
Expand Down Expand Up @@ -1321,6 +1328,7 @@ void *stor_thread(PFTPCONTEXT context)
sendstring(context, error426);

close(clientsocket);
context->DataSocket = INVALID_SOCKET;
}

context->WorkerThreadValid = -1;
Expand Down Expand Up @@ -1470,6 +1478,7 @@ void *append_thread(PFTPCONTEXT context)
sendstring(context, error426);

close(clientsocket);
context->DataSocket = INVALID_SOCKET;
}

context->WorkerThreadValid = -1;
Expand Down Expand Up @@ -1760,6 +1769,7 @@ void *msld_thread(PFTPCONTEXT context)
sendstring(context, error426);

close(clientsocket);
context->DataSocket = INVALID_SOCKET;
}

context->WorkerThreadValid = -1;
Expand Down

0 comments on commit 5980ea1

Please sign in to comment.