- attempt to let user know when host does not have data port open
This commit is contained in:
parent
0926f1e747
commit
bb2ba50589
|
@ -3749,6 +3749,15 @@ void MenuStateConnectedGame::FTPClient_CallbackEvent(string itemName,
|
||||||
sprintf(szMsg,"Player: %s FAILED to download the map: [%s] using CURL version [%s]",getHumanPlayerName().c_str(),itemName.c_str(),curlVersion->version);
|
sprintf(szMsg,"Player: %s FAILED to download the map: [%s] using CURL version [%s]",getHumanPlayerName().c_str(),itemName.c_str(),curlVersion->version);
|
||||||
}
|
}
|
||||||
clientInterface->sendTextMessage(szMsg,-1, lang.isLanguageLocal(languageList[i]),languageList[i]);
|
clientInterface->sendTextMessage(szMsg,-1, lang.isLanguageLocal(languageList[i]),languageList[i]);
|
||||||
|
|
||||||
|
if(result.first == ftp_crt_HOST_NOT_ACCEPTING) {
|
||||||
|
if(lang.hasString("HostNotAcceptingDataConnections",languageList[i]) == true) {
|
||||||
|
clientInterface->sendTextMessage(lang.get("DataMissingMapFailDownload",languageList[i]),-1, lang.isLanguageLocal(languageList[i]),languageList[i]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
clientInterface->sendTextMessage("*Warning* the host is not accepting data connections.",-1, lang.isLanguageLocal(languageList[i]),languageList[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.addLine(result.second,true);
|
console.addLine(result.second,true);
|
||||||
|
@ -3823,6 +3832,15 @@ void MenuStateConnectedGame::FTPClient_CallbackEvent(string itemName,
|
||||||
sprintf(szMsg,"Player: %s FAILED to download the tileset: [%s] using CURL version [%s]",getHumanPlayerName().c_str(),itemName.c_str(),curlVersion->version);
|
sprintf(szMsg,"Player: %s FAILED to download the tileset: [%s] using CURL version [%s]",getHumanPlayerName().c_str(),itemName.c_str(),curlVersion->version);
|
||||||
}
|
}
|
||||||
clientInterface->sendTextMessage(szMsg,-1, lang.isLanguageLocal(languageList[i]),languageList[i]);
|
clientInterface->sendTextMessage(szMsg,-1, lang.isLanguageLocal(languageList[i]),languageList[i]);
|
||||||
|
|
||||||
|
if(result.first == ftp_crt_HOST_NOT_ACCEPTING) {
|
||||||
|
if(lang.hasString("HostNotAcceptingDataConnections",languageList[i]) == true) {
|
||||||
|
clientInterface->sendTextMessage(lang.get("DataMissingMapFailDownload",languageList[i]),-1, lang.isLanguageLocal(languageList[i]),languageList[i]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
clientInterface->sendTextMessage("*Warning* the host is not accepting data connections.",-1, lang.isLanguageLocal(languageList[i]),languageList[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.addLine(result.second,true);
|
console.addLine(result.second,true);
|
||||||
|
@ -3899,6 +3917,15 @@ void MenuStateConnectedGame::FTPClient_CallbackEvent(string itemName,
|
||||||
sprintf(szMsg,"Player: %s FAILED to download the techtree: [%s] using CURL version [%s]",getHumanPlayerName().c_str(),itemName.c_str(),curlVersion->version);
|
sprintf(szMsg,"Player: %s FAILED to download the techtree: [%s] using CURL version [%s]",getHumanPlayerName().c_str(),itemName.c_str(),curlVersion->version);
|
||||||
}
|
}
|
||||||
clientInterface->sendTextMessage(szMsg,-1, lang.isLanguageLocal(languageList[i]),languageList[i]);
|
clientInterface->sendTextMessage(szMsg,-1, lang.isLanguageLocal(languageList[i]),languageList[i]);
|
||||||
|
|
||||||
|
if(result.first == ftp_crt_HOST_NOT_ACCEPTING) {
|
||||||
|
if(lang.hasString("HostNotAcceptingDataConnections",languageList[i]) == true) {
|
||||||
|
clientInterface->sendTextMessage(lang.get("DataMissingMapFailDownload",languageList[i]),-1, lang.isLanguageLocal(languageList[i]),languageList[i]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
clientInterface->sendTextMessage("*Warning* the host is not accepting data connections.",-1, lang.isLanguageLocal(languageList[i]),languageList[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.addLine(result.second,true);
|
console.addLine(result.second,true);
|
||||||
|
|
|
@ -30,7 +30,8 @@ enum FTP_Client_ResultType {
|
||||||
ftp_crt_SUCCESS = 0,
|
ftp_crt_SUCCESS = 0,
|
||||||
ftp_crt_PARTIALFAIL = 1,
|
ftp_crt_PARTIALFAIL = 1,
|
||||||
ftp_crt_FAIL = 2,
|
ftp_crt_FAIL = 2,
|
||||||
ftp_crt_ABORTED = 3
|
ftp_crt_ABORTED = 3,
|
||||||
|
ftp_crt_HOST_NOT_ACCEPTING = 4
|
||||||
};
|
};
|
||||||
|
|
||||||
enum FTP_Client_CallbackType {
|
enum FTP_Client_CallbackType {
|
||||||
|
|
|
@ -338,6 +338,9 @@ pair<FTP_Client_ResultType,string> FTPClientThread::getMapFromServer(pair<string
|
||||||
if(res == CURLE_PARTIAL_FILE) {
|
if(res == CURLE_PARTIAL_FILE) {
|
||||||
result.first = ftp_crt_PARTIALFAIL;
|
result.first = ftp_crt_PARTIALFAIL;
|
||||||
}
|
}
|
||||||
|
else if(res == CURLE_COULDNT_CONNECT) {
|
||||||
|
result.first = ftp_crt_HOST_NOT_ACCEPTING;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
result.first = ftp_crt_SUCCESS;
|
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) {
|
if(res == CURLE_PARTIAL_FILE || ftpfile.isValidXfer == true) {
|
||||||
result.first = ftp_crt_PARTIALFAIL;
|
result.first = ftp_crt_PARTIALFAIL;
|
||||||
}
|
}
|
||||||
|
else if(res == CURLE_COULDNT_CONNECT) {
|
||||||
|
result.first = ftp_crt_HOST_NOT_ACCEPTING;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(destRootFolder != "") {
|
if(destRootFolder != "") {
|
||||||
if(pathCreated == true) {
|
if(pathCreated == true) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user