mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
add ice server address to hearbeat if full networking is on
This commit is contained in:
parent
ab414f65eb
commit
55002b8d5e
1 changed files with 7 additions and 1 deletions
|
@ -1046,6 +1046,7 @@ void DomainServer::sendHeartbeatToDataServer(const QString& networkAddress) {
|
|||
// setup the domain object to send to the data server
|
||||
const QString PUBLIC_NETWORK_ADDRESS_KEY = "network_address";
|
||||
const QString AUTOMATIC_NETWORKING_KEY = "automatic_networking";
|
||||
const QString ICE_SERVER_ADDRESS = "ice_server_address";
|
||||
|
||||
QJsonObject domainObject;
|
||||
if (!networkAddress.isEmpty()) {
|
||||
|
@ -1054,6 +1055,11 @@ void DomainServer::sendHeartbeatToDataServer(const QString& networkAddress) {
|
|||
|
||||
domainObject[AUTOMATIC_NETWORKING_KEY] = _automaticNetworkingSetting;
|
||||
|
||||
// if we're using full automatic networking and we have a current ice-server socket, use that now
|
||||
if (_automaticNetworkingSetting == FULL_AUTOMATIC_NETWORKING_VALUE && !_iceServerSocket.isNull()) {
|
||||
domainObject[ICE_SERVER_ADDRESS] = _iceServerSocket.getAddress().toString();
|
||||
}
|
||||
|
||||
// add a flag to indicate if this domain uses restricted access - for now that will exclude it from listings
|
||||
const QString RESTRICTED_ACCESS_FLAG = "restricted";
|
||||
|
||||
|
@ -1079,7 +1085,7 @@ void DomainServer::sendHeartbeatToDataServer(const QString& networkAddress) {
|
|||
QString domainUpdateJSON = QString("{\"domain\": %1 }").arg(QString(QJsonDocument(domainObject).toJson()));
|
||||
|
||||
AccountManager::getInstance().sendRequest(DOMAIN_UPDATE.arg(uuidStringWithoutCurlyBraces(domainID)),
|
||||
AccountManagerAuth::Required,
|
||||
AccountManagerAuth::Optional,
|
||||
QNetworkAccessManager::PutOperation,
|
||||
JSONCallbackParameters(),
|
||||
domainUpdateJSON.toUtf8());
|
||||
|
|
Loading…
Reference in a new issue