mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
data-server name tweak and isAgent behaviour change
This commit is contained in:
parent
98b06112bd
commit
f553becabe
3 changed files with 12 additions and 13 deletions
|
@ -236,10 +236,6 @@ OctreeServer::OctreeServer(ReceivedMessage& message) :
|
||||||
{
|
{
|
||||||
_averageLoopTime.updateAverage(0);
|
_averageLoopTime.updateAverage(0);
|
||||||
qDebug() << "Octree server starting... [" << this << "]";
|
qDebug() << "Octree server starting... [" << this << "]";
|
||||||
|
|
||||||
// make sure the AccountManager has an Auth URL for payment redemptions
|
|
||||||
|
|
||||||
AccountManager::getInstance().setAuthURL(NetworkingConstants::METAVERSE_SERVER_URL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OctreeServer::~OctreeServer() {
|
OctreeServer::~OctreeServer() {
|
||||||
|
|
|
@ -590,6 +590,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) :
|
||||||
connect(&accountManager, &AccountManager::usernameChanged, this, &Application::updateWindowTitle);
|
connect(&accountManager, &AccountManager::usernameChanged, this, &Application::updateWindowTitle);
|
||||||
|
|
||||||
// set the account manager's root URL and trigger a login request if we don't have the access token
|
// set the account manager's root URL and trigger a login request if we don't have the access token
|
||||||
|
accountManager.setIsAgent(true);
|
||||||
accountManager.setAuthURL(NetworkingConstants::METAVERSE_SERVER_URL);
|
accountManager.setAuthURL(NetworkingConstants::METAVERSE_SERVER_URL);
|
||||||
UserActivityLogger::getInstance().launch(applicationVersion());
|
UserActivityLogger::getInstance().launch(applicationVersion());
|
||||||
|
|
||||||
|
|
|
@ -169,14 +169,16 @@ void AccountManager::setAuthURL(const QUrl& authURL) {
|
||||||
if (loadedFile) {
|
if (loadedFile) {
|
||||||
// pull out the stored access token and store it in memory
|
// pull out the stored access token and store it in memory
|
||||||
_accountInfo = accountsMap[_authURL.toString()].value<DataServerAccountInfo>();
|
_accountInfo = accountsMap[_authURL.toString()].value<DataServerAccountInfo>();
|
||||||
|
|
||||||
qCDebug(networking) << "Found metaverse API account information for" << qPrintable(_authURL.toString());
|
qCDebug(networking) << "Found metaverse API account information for" << qPrintable(_authURL.toString());
|
||||||
|
|
||||||
// profile info isn't guaranteed to be saved too
|
if (_isAgent) {
|
||||||
if (_accountInfo.hasProfile()) {
|
// profile info isn't guaranteed to be saved too
|
||||||
emit profileChanged();
|
if (_accountInfo.hasProfile()) {
|
||||||
} else {
|
emit profileChanged();
|
||||||
requestProfile();
|
} else {
|
||||||
|
requestProfile();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -327,7 +329,7 @@ void AccountManager::passSuccessToCallback(QNetworkReply* requestReply) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (VERBOSE_HTTP_REQUEST_DEBUGGING) {
|
if (VERBOSE_HTTP_REQUEST_DEBUGGING) {
|
||||||
qCDebug(networking) << "Received JSON response from data-server that has no matching callback.";
|
qCDebug(networking) << "Received JSON response from metaverse API that has no matching callback.";
|
||||||
qCDebug(networking) << QJsonDocument::fromJson(requestReply->readAll());
|
qCDebug(networking) << QJsonDocument::fromJson(requestReply->readAll());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -345,7 +347,7 @@ void AccountManager::passErrorToCallback(QNetworkReply* requestReply) {
|
||||||
_pendingCallbackMap.remove(requestReply);
|
_pendingCallbackMap.remove(requestReply);
|
||||||
} else {
|
} else {
|
||||||
if (VERBOSE_HTTP_REQUEST_DEBUGGING) {
|
if (VERBOSE_HTTP_REQUEST_DEBUGGING) {
|
||||||
qCDebug(networking) << "Received error response from data-server that has no matching callback.";
|
qCDebug(networking) << "Received error response from metaverse API that has no matching callback.";
|
||||||
qCDebug(networking) << "Error" << requestReply->error() << "-" << requestReply->errorString();
|
qCDebug(networking) << "Error" << requestReply->error() << "-" << requestReply->errorString();
|
||||||
qCDebug(networking) << requestReply->readAll();
|
qCDebug(networking) << requestReply->readAll();
|
||||||
}
|
}
|
||||||
|
@ -591,7 +593,7 @@ void AccountManager::processGeneratedKeypair(const QByteArray& publicKey, const
|
||||||
|
|
||||||
qCDebug(networking) << "Generated 2048-bit RSA key-pair. Storing private key and uploading public key.";
|
qCDebug(networking) << "Generated 2048-bit RSA key-pair. Storing private key and uploading public key.";
|
||||||
|
|
||||||
// set the private key on our data-server account info
|
// set the private key on our metaverse API account info
|
||||||
_accountInfo.setPrivateKey(privateKey);
|
_accountInfo.setPrivateKey(privateKey);
|
||||||
persistAccountToSettings();
|
persistAccountToSettings();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue