Changeset View
Changeset View
Standalone View
Standalone View
source/lobby/XmppClient.cpp
/* Copyright (C) 2021 Wildfire Games. | /* Copyright (C) 2023 Wildfire Games. | ||||
* This file is part of 0!A.D. | * This file is part of 0!A.D. | ||||
* | * | ||||
* 0!A.D. is free software: you can redistribute it and/or modify | * 0!A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0!A.D. is distributed in the hope that it will be useful, | * 0!A.D. is distributed in the hope that it will be useful, | ||||
▲ Show 20 Lines • Show All 847 Lines • ▼ Show 20 Lines | if (cd) | ||||
if (!cd->m_Error.empty()) | if (!cd->m_Error.empty()) | ||||
{ | { | ||||
g_NetClient->HandleGetServerDataFailed(cd->m_Error.c_str()); | g_NetClient->HandleGetServerDataFailed(cd->m_Error.c_str()); | ||||
return true; | return true; | ||||
} | } | ||||
g_NetClient->SetupServerData(cd->m_Ip.to_string(), stoi(cd->m_Port.to_string()), !cd->m_UseSTUN.empty()); | g_NetClient->SetupServerData(cd->m_Ip.to_string(), stoi(cd->m_Port.to_string()), !cd->m_UseSTUN.empty()); | ||||
g_NetClient->TryToConnect(iq.from().full(), !cd->m_IsLocalIP.empty()); | |||||
if (!g_NetClient->TryToConnectViaLobby(iq.from().full(), !cd->m_IsLocalIP.empty())) | |||||
{ | |||||
LOGMESSAGE("XmppClient: Failed to establish connection"); | |||||
return true; | |||||
} | |||||
} | } | ||||
if (gq) | if (gq) | ||||
{ | { | ||||
if (iq.from().full() == m_xpartamuppId && gq->m_Command == "register" && g_NetServer && !g_NetServer->GetUseSTUN()) | if (iq.from().full() == m_xpartamuppId && gq->m_Command == "register" && g_NetServer && !g_NetServer->GetUseSTUN()) | ||||
{ | { | ||||
if (gq->m_GameList.empty()) | if (gq->m_GameList.empty()) | ||||
{ | { | ||||
LOGWARNING("XmppClient: Received empty game list in response to Game Register"); | LOGWARNING("XmppClient: Received empty game list in response to Game Register"); | ||||
▲ Show 20 Lines • Show All 492 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator