From 671d8bb286322e448803291640448d56f0a088d7 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 3 Oct 2021 13:25:24 +0800 Subject: [PATCH] Show more useful error on login failure --- ryzom/client/src/login.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ryzom/client/src/login.cpp b/ryzom/client/src/login.cpp index 9502120c5..7b0377890 100644 --- a/ryzom/client/src/login.cpp +++ b/ryzom/client/src/login.cpp @@ -2906,13 +2906,13 @@ string checkLogin(const string &login, const string &password, const string &cli std::string cryptedPassword = CCrypt::crypt(password, Salt); if(!HttpClient.sendGet(url + "?cmd=login&login=" + login + "&password=" + cryptedPassword + "&clientApplication=" + clientApp + "&cp=2" + "&lg=" + ClientCfg.LanguageCode + customParameters)) - return "Can't send (error code 2)"; + return std::string("Can't send (error code 2) ") + HttpClient.lastError(); } else { // don't send login and password if empty if(!HttpClient.sendGet(url + "?cmd=login&clientApplication=" + clientApp + "&cp=2" + "&lg=" + ClientCfg.LanguageCode + customParameters)) - return "Can't send (error code 2)"; + return std::string("Can't send (error code 2) ") + HttpClient.lastError(); } // the response should contains the result code and the cookie value @@ -3022,7 +3022,7 @@ string checkLogin(const string &login, const string &password, const string &cli std::string cryptedPassword = CCrypt::crypt(password, Salt); if(!HttpClient.sendGet(url + "?login=" + login + "&password=" + cryptedPassword + "&clientApplication=" + clientApp + "&cp=2")) - return "Can't send (error code 2)"; + return std::string("Can't send (error code 2) ") + HttpClient.lastError(); /* if(!send(ClientCfg.ConfigFile.getVar("StartupPage").asString()+"?login="+login+"&password="+password+"&clientApplication="+clientApp)) return "Can't send (error code 2)";