Show the socket error code when failed to connect to adhoc server

This commit is contained in:
ANR2ME 2021-04-02 05:07:25 +07:00
parent e3228ca1b5
commit e508885cc4

View file

@ -2199,7 +2199,7 @@ int initNetwork(SceNetAdhocctlAdhocId *adhoc_id){
}
if (IsSocketReady(metasocket, false, true) <= 0) {
ERROR_LOG(SCENET, "Socket error (%i) when connecting to AdhocServer [%s/%s:%u]", errorcode, g_Config.proAdhocServer.c_str(), ip2str(g_adhocServerIP.in.sin_addr).c_str(), ntohs(g_adhocServerIP.in.sin_port));
host->NotifyUserMessage(n->T("Failed to connect to Adhoc Server"), 1.0f, 0x0000ff);
host->NotifyUserMessage(std::string(n->T("Failed to connect to Adhoc Server")) + " (" + std::string(n->T("Error")) + ": " + std::to_string(errorcode) + ")", 1.0f, 0x0000ff);
return iResult;
}
}