mirror of
https://github.com/glest/glest-source.git
synced 2025-08-11 19:04:00 +02:00
- commented console output for FTP progress
This commit is contained in:
@@ -205,7 +205,9 @@ if(VERBOSE_MODE_ENABLED) printf("ERROR: Connection refused; Session limit reache
|
||||
LEN_RXBUF - pSession->rxBufWriteIdx);
|
||||
if(len <= 0) // has client shutdown the connection?
|
||||
{
|
||||
if(VERBOSE_MODE_ENABLED) printf("ftpExecute ERROR ON RECEIVE for socket = %d\n",ctrlSocket);
|
||||
int errorNumber = len; //getLastSocketError();
|
||||
const char *errText = getLastSocketErrorText(&errorNumber);
|
||||
if(VERBOSE_MODE_ENABLED) printf("ftpExecute ERROR ON RECEIVE for socket = %d, data len = %d, error = %d [%s]\n",ctrlSocket,(LEN_RXBUF - pSession->rxBufWriteIdx),errorNumber,errText);
|
||||
|
||||
ftpUntrackSocket(ctrlSocket);
|
||||
ftpCloseSession(n);
|
||||
|
@@ -36,6 +36,7 @@
|
||||
#include "ftpTypes.h"
|
||||
#include "ftpConfig.h"
|
||||
#include "ftp.h"
|
||||
#include "errno.h"
|
||||
|
||||
ip_t ownIp;
|
||||
|
||||
@@ -446,4 +447,14 @@ int ftpSelect(int poll)
|
||||
}
|
||||
}
|
||||
|
||||
int getLastSocketError() {
|
||||
return errno;
|
||||
}
|
||||
|
||||
const char * getLastSocketErrorText(int *errNumber) {
|
||||
int errId = (errNumber != NULL ? *errNumber : getLastSocketError());
|
||||
return strerror(errId);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
@@ -480,4 +480,13 @@ int ftpSelect(int poll)
|
||||
}
|
||||
}
|
||||
|
||||
int getLastSocketError() {
|
||||
return WSAGetLastError();
|
||||
}
|
||||
|
||||
const char * getLastSocketErrorText(int *errNumber) {
|
||||
int errId = (errNumber != NULL ? *errNumber : getLastSocketError());
|
||||
return WSAGetLastErrorMessage("",errId);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user