mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
correct reference to new hostname for Qt temp variable changes
This commit is contained in:
parent
4dd6afc08f
commit
45d82dc97c
2 changed files with 5 additions and 4 deletions
|
@ -1143,10 +1143,11 @@ void Application::editPreferences() {
|
|||
return;
|
||||
}
|
||||
|
||||
const char* newHostname = domainServerHostname->text().toStdString().c_str();
|
||||
|
||||
char newHostname[MAX_HOSTNAME_BYTES] = {};
|
||||
memcpy(newHostname, domainServerHostname->text().toAscii().data(), domainServerHostname->text().size());
|
||||
|
||||
// check if the domain server hostname is new
|
||||
if (memcmp(NodeList::getInstance()->getDomainHostname(), newHostname, sizeof(&newHostname)) != 0) {
|
||||
if (memcmp(NodeList::getInstance()->getDomainHostname(), newHostname, strlen(newHostname)) != 0) {
|
||||
// if so we need to clear the nodelist and delete the existing voxel and environment data
|
||||
Node *voxelServer = NodeList::getInstance()->soloNodeOfType(NODE_TYPE_VOXEL_SERVER);
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ const int DOMAIN_SERVER_CHECK_IN_USECS = 1 * 1000000;
|
|||
|
||||
extern const char SOLO_NODE_TYPES[3];
|
||||
|
||||
const int MAX_HOSTNAME_BYTES = 255;
|
||||
const int MAX_HOSTNAME_BYTES = 256;
|
||||
|
||||
extern const char DEFAULT_DOMAIN_HOSTNAME[MAX_HOSTNAME_BYTES];
|
||||
extern const char DEFAULT_DOMAIN_IP[INET_ADDRSTRLEN]; // IP Address will be re-set by lookup on startup
|
||||
|
|
Loading…
Reference in a new issue