mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 10:13:12 +02:00
domain-server patches while looking for payload/pool errors
This commit is contained in:
parent
15ba5f7ab1
commit
7d27830064
3 changed files with 6 additions and 13 deletions
|
@ -575,7 +575,7 @@ void DomainServer::prepopulateStaticAssignmentFile() {
|
|||
|
||||
Assignment voxelServerAssignment(Assignment::CreateCommand,
|
||||
Assignment::VoxelServerType,
|
||||
(assignmentPool.isEmpty() ? NULL : assignmentPool.toLocal8Bit().constData()));
|
||||
assignmentPool);
|
||||
|
||||
voxelServerAssignment.setPayload(config.toUtf8());
|
||||
|
||||
|
@ -615,8 +615,8 @@ void DomainServer::prepopulateStaticAssignmentFile() {
|
|||
}
|
||||
|
||||
Assignment particleServerAssignment(Assignment::CreateCommand,
|
||||
Assignment::ParticleServerType,
|
||||
(assignmentPool.isEmpty() ? NULL : assignmentPool.toLocal8Bit().constData()));
|
||||
Assignment::ParticleServerType,
|
||||
assignmentPool);
|
||||
|
||||
particleServerAssignment.setPayload(config.toLocal8Bit());
|
||||
|
||||
|
@ -689,7 +689,7 @@ Assignment* DomainServer::deployableAssignmentForRequest(Assignment& requestAssi
|
|||
bool assignmentTypesMatch = (*assignment)->getType() == requestAssignment.getType();
|
||||
bool nietherHasPool = (*assignment)->getPool().isEmpty() && requestAssignment.getPool().isEmpty();
|
||||
bool assignmentPoolsMatch = (*assignment)->getPool() == requestAssignment.getPool();
|
||||
|
||||
|
||||
if ((requestIsAllTypes || assignmentTypesMatch) && (nietherHasPool || assignmentPoolsMatch)) {
|
||||
|
||||
Assignment* deployableAssignment = *assignment;
|
||||
|
|
|
@ -14,9 +14,6 @@
|
|||
|
||||
#include "Assignment.h"
|
||||
|
||||
const char IPv4_ADDRESS_DESIGNATOR = 4;
|
||||
const char IPv6_ADDRESS_DESIGNATOR = 6;
|
||||
|
||||
Assignment::Type Assignment::typeForNodeType(NodeType_t nodeType) {
|
||||
switch (nodeType) {
|
||||
case NodeType::AudioMixer:
|
||||
|
@ -95,10 +92,7 @@ Assignment::Assignment(const QByteArray& packet) :
|
|||
}
|
||||
|
||||
packetStream >> _pool;
|
||||
|
||||
if (!packetStream.atEnd()) {
|
||||
_payload = packet.mid(packetStream.device()->pos());
|
||||
}
|
||||
packetStream >> _payload;
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include "NodeList.h"
|
||||
|
||||
const int MAX_PAYLOAD_BYTES = 1024;
|
||||
const int MAX_ASSIGNMENT_POOL_BYTES = 64 + sizeof('\0');
|
||||
|
||||
const QString emptyPool = QString();
|
||||
|
||||
|
@ -76,7 +75,7 @@ public:
|
|||
Assignment::Location getLocation() const { return _location; }
|
||||
|
||||
const QByteArray& getPayload() const { return _payload; }
|
||||
void setPayload(const QByteArray& payload) { _payload = payload; }
|
||||
void setPayload(const QByteArray& payload) { _payload = payload.left(MAX_PAYLOAD_BYTES); }
|
||||
|
||||
void setPool(const QString& pool) { _pool = pool; };
|
||||
const QString& getPool() const { return _pool; }
|
||||
|
|
Loading…
Reference in a new issue