Merge pull request #1959 from birarda/authentication

default domain is root again
This commit is contained in:
ZappoMan 2014-02-10 11:25:44 -08:00
commit d743df902a
4 changed files with 10 additions and 6 deletions

Binary file not shown.

Binary file not shown.

View file

@ -1827,6 +1827,9 @@ void Application::init() {
_audio.setJitterBufferSamples(Menu::getInstance()->getAudioJitterBufferSamples());
}
qDebug("Loaded settings");
// fire off an immediate domain-server check in now that settings are loaded
NodeList::getInstance()->sendDomainServerCheckIn();
// Set up VoxelSystem after loading preferences so we can get the desired max voxel count
_voxels.setMaxVoxels(Menu::getInstance()->getMaxVoxels());

View file

@ -27,7 +27,7 @@ const char SOLO_NODE_TYPES[2] = {
NodeType::AudioMixer
};
const QString DEFAULT_DOMAIN_HOSTNAME = "alpha.highfidelity.io";
const QString DEFAULT_DOMAIN_HOSTNAME = "root.highfidelity.io";
const unsigned short DEFAULT_DOMAIN_SERVER_PORT = 40102;
NodeList* NodeList::_sharedInstance = NULL;
@ -59,7 +59,7 @@ NodeList* NodeList::getInstance() {
NodeList::NodeList(char newOwnerType, unsigned short int newSocketListenPort) :
_nodeHash(),
_nodeHashMutex(QMutex::Recursive),
_domainHostname(DEFAULT_DOMAIN_HOSTNAME),
_domainHostname(),
_domainSockAddr(HifiSockAddr(QHostAddress::Null, DEFAULT_DOMAIN_SERVER_PORT)),
_nodeSocket(this),
_ownerType(newOwnerType),
@ -498,7 +498,7 @@ void NodeList::sendDomainServerCheckIn() {
static bool printedDomainServerIP = false;
// Lookup the IP address of the domain server if we need to
if (_domainSockAddr.getAddress().isNull()) {
if (_domainSockAddr.getAddress().isNull() && !_domainHostname.isEmpty()) {
qDebug("Looking up DS hostname %s.", _domainHostname.toLocal8Bit().constData());
QHostInfo domainServerHostInfo = QHostInfo::fromName(_domainHostname);
@ -527,8 +527,8 @@ void NodeList::sendDomainServerCheckIn() {
// we don't know our public socket and we need to send it to the domain server
// send a STUN request to figure it out
sendSTUNRequest();
} else {
// construct the DS check in packet if we need to
} else if (!_domainSockAddr.getAddress().isNull()) {
// construct the DS check in packet if we can
// check in packet has header, optional UUID, node type, port, IP, node types of interest, null termination
QByteArray domainServerPacket = byteArrayWithPopluatedHeader(PacketTypeDomainListRequest);
@ -807,7 +807,8 @@ void NodeList::loadData(QSettings *settings) {
if (domainServerHostname.size() > 0) {
_domainHostname = domainServerHostname;
emit domainChanged(_domainHostname);
} else {
_domainHostname = DEFAULT_DOMAIN_HOSTNAME;
}
settings->endGroup();