mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 19:50:38 +02:00
Merge pull request #4254 from birarda/master
handle custom domain port if returned via place API
This commit is contained in:
commit
26b4882ddf
1 changed files with 7 additions and 2 deletions
|
@ -202,14 +202,19 @@ void AddressManager::goToAddressFromObject(const QVariantMap& dataObject, const
|
||||||
|
|
||||||
if (!domainObject.isEmpty()) {
|
if (!domainObject.isEmpty()) {
|
||||||
const QString DOMAIN_NETWORK_ADDRESS_KEY = "network_address";
|
const QString DOMAIN_NETWORK_ADDRESS_KEY = "network_address";
|
||||||
|
const QString DOMAIN_NETWORK_PORT_KEY = "network_port";
|
||||||
const QString DOMAIN_ICE_SERVER_ADDRESS_KEY = "ice_server_address";
|
const QString DOMAIN_ICE_SERVER_ADDRESS_KEY = "ice_server_address";
|
||||||
|
|
||||||
if (domainObject.contains(DOMAIN_NETWORK_ADDRESS_KEY)) {
|
if (domainObject.contains(DOMAIN_NETWORK_ADDRESS_KEY)) {
|
||||||
QString domainHostname = domainObject[DOMAIN_NETWORK_ADDRESS_KEY].toString();
|
QString domainHostname = domainObject[DOMAIN_NETWORK_ADDRESS_KEY].toString();
|
||||||
|
|
||||||
|
quint16 domainPort = domainObject.contains(DOMAIN_NETWORK_PORT_KEY)
|
||||||
|
? domainObject[DOMAIN_NETWORK_PORT_KEY].toUInt()
|
||||||
|
: DEFAULT_DOMAIN_SERVER_PORT;
|
||||||
|
|
||||||
qDebug() << "Possible domain change required to connect to" << domainHostname
|
qDebug() << "Possible domain change required to connect to" << domainHostname
|
||||||
<< "on" << DEFAULT_DOMAIN_SERVER_PORT;
|
<< "on" << domainPort;
|
||||||
emit possibleDomainChangeRequired(domainHostname, DEFAULT_DOMAIN_SERVER_PORT);
|
emit possibleDomainChangeRequired(domainHostname, domainPort);
|
||||||
} else {
|
} else {
|
||||||
QString iceServerAddress = domainObject[DOMAIN_ICE_SERVER_ADDRESS_KEY].toString();
|
QString iceServerAddress = domainObject[DOMAIN_ICE_SERVER_ADDRESS_KEY].toString();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue