- attempt to let user know when host does not have data port open

This commit is contained in:
Mark Vejvoda
2012-10-16 00:58:49 +00:00
parent 0926f1e747
commit bb2ba50589
3 changed files with 36 additions and 1 deletions

View File

@@ -30,7 +30,8 @@ enum FTP_Client_ResultType {
ftp_crt_SUCCESS = 0,
ftp_crt_PARTIALFAIL = 1,
ftp_crt_FAIL = 2,
ftp_crt_ABORTED = 3
ftp_crt_ABORTED = 3,
ftp_crt_HOST_NOT_ACCEPTING = 4
};
enum FTP_Client_CallbackType {

View File

@@ -338,6 +338,9 @@ pair<FTP_Client_ResultType,string> FTPClientThread::getMapFromServer(pair<string
if(res == CURLE_PARTIAL_FILE) {
result.first = ftp_crt_PARTIALFAIL;
}
else if(res == CURLE_COULDNT_CONNECT) {
result.first = ftp_crt_HOST_NOT_ACCEPTING;
}
}
else {
result.first = ftp_crt_SUCCESS;
@@ -931,6 +934,10 @@ pair<FTP_Client_ResultType,string> FTPClientThread::getFileFromServer(FTP_Clien
if(res == CURLE_PARTIAL_FILE || ftpfile.isValidXfer == true) {
result.first = ftp_crt_PARTIALFAIL;
}
else if(res == CURLE_COULDNT_CONNECT) {
result.first = ftp_crt_HOST_NOT_ACCEPTING;
}
if(destRootFolder != "") {
if(pathCreated == true) {