mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-16 22:30:42 +02:00
Rename isReplicant to isReplicated
This commit is contained in:
parent
2ff065f751
commit
84e1a6f893
6 changed files with 19 additions and 17 deletions
|
@ -2211,9 +2211,9 @@ void DomainServer::refreshStaticAssignmentAndAddToQueue(SharedAssignmentPointer&
|
|||
}
|
||||
|
||||
void DomainServer::nodeAdded(SharedNodePointer node) {
|
||||
// TODO Check to see if node is in list of replicant nodes
|
||||
// TODO Check to see if node is in list of replicated nodes
|
||||
if (node->getType() == NodeType::Agent) {
|
||||
node->setIsReplicant(true);
|
||||
node->setIsReplicated(true);
|
||||
}
|
||||
|
||||
// we don't use updateNodeWithData, so add the DomainServerNodeData to the node here
|
||||
|
|
|
@ -569,7 +569,7 @@ void LimitedNodeList::handleNodeKill(const SharedNodePointer& node) {
|
|||
SharedNodePointer LimitedNodeList::addOrUpdateNode(const QUuid& uuid, NodeType_t nodeType,
|
||||
const HifiSockAddr& publicSocket, const HifiSockAddr& localSocket,
|
||||
const NodePermissions& permissions,
|
||||
bool isReplicant,
|
||||
bool isReplicated,
|
||||
const QUuid& connectionSecret) {
|
||||
QReadLocker readLocker(&_nodeMutex);
|
||||
NodeHash::const_iterator it = _nodeHash.find(uuid);
|
||||
|
@ -581,12 +581,12 @@ SharedNodePointer LimitedNodeList::addOrUpdateNode(const QUuid& uuid, NodeType_t
|
|||
matchingNode->setLocalSocket(localSocket);
|
||||
matchingNode->setPermissions(permissions);
|
||||
matchingNode->setConnectionSecret(connectionSecret);
|
||||
matchingNode->setIsReplicant(isReplicant);
|
||||
matchingNode->setIsReplicated(isReplicated);
|
||||
|
||||
return matchingNode;
|
||||
} else {
|
||||
// we didn't have this node, so add them
|
||||
Node* newNode = new Node(uuid, nodeType, publicSocket, localSocket, permissions, isReplicant, connectionSecret, this);
|
||||
Node* newNode = new Node(uuid, nodeType, publicSocket, localSocket, permissions, isReplicated, connectionSecret, this);
|
||||
|
||||
if (nodeType == NodeType::AudioMixer) {
|
||||
LimitedNodeList::flagTimeForConnectionStep(LimitedNodeList::AddedAudioMixer);
|
||||
|
|
|
@ -146,7 +146,7 @@ public:
|
|||
SharedNodePointer addOrUpdateNode(const QUuid& uuid, NodeType_t nodeType,
|
||||
const HifiSockAddr& publicSocket, const HifiSockAddr& localSocket,
|
||||
const NodePermissions& permissions = DEFAULT_AGENT_PERMISSIONS,
|
||||
bool isReplicant = false, const QUuid& connectionSecret = QUuid());
|
||||
bool isReplicated = false, const QUuid& connectionSecret = QUuid());
|
||||
|
||||
static bool parseSTUNResponse(udt::BasePacket* packet, QHostAddress& newPublicAddress, uint16_t& newPublicPort);
|
||||
bool hasCompletedInitialSTUN() const { return _hasCompletedInitialSTUN; }
|
||||
|
|
|
@ -51,12 +51,12 @@ const QString& NodeType::getNodeTypeName(NodeType_t nodeType) {
|
|||
}
|
||||
|
||||
Node::Node(const QUuid& uuid, NodeType_t type, const HifiSockAddr& publicSocket,
|
||||
const HifiSockAddr& localSocket, const NodePermissions& permissions, bool isReplicant,
|
||||
const HifiSockAddr& localSocket, const NodePermissions& permissions, bool isReplicated,
|
||||
const QUuid& connectionSecret, QObject* parent) :
|
||||
NetworkPeer(uuid, publicSocket, localSocket, parent),
|
||||
_type(type),
|
||||
_connectionSecret(connectionSecret),
|
||||
_isReplicant(isReplicant),
|
||||
_isReplicated(isReplicated),
|
||||
_pingMs(-1), // "Uninitialized"
|
||||
_clockSkewUsec(0),
|
||||
_mutex(),
|
||||
|
@ -136,7 +136,7 @@ QDataStream& operator<<(QDataStream& out, const Node& node) {
|
|||
out << node._publicSocket;
|
||||
out << node._localSocket;
|
||||
out << node._permissions;
|
||||
out << node._isReplicant;
|
||||
out << node._isReplicated;
|
||||
return out;
|
||||
}
|
||||
|
||||
|
@ -146,7 +146,7 @@ QDataStream& operator>>(QDataStream& in, Node& node) {
|
|||
in >> node._publicSocket;
|
||||
in >> node._localSocket;
|
||||
in >> node._permissions;
|
||||
in >> node._isReplicant;
|
||||
in >> node._isReplicated;
|
||||
return in;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ class Node : public NetworkPeer {
|
|||
public:
|
||||
Node(const QUuid& uuid, NodeType_t type,
|
||||
const HifiSockAddr& publicSocket, const HifiSockAddr& localSocket,
|
||||
const NodePermissions& permissions, bool isReplicant, const QUuid& connectionSecret = QUuid(),
|
||||
const NodePermissions& permissions, bool isReplicated, const QUuid& connectionSecret = QUuid(),
|
||||
QObject* parent = 0);
|
||||
|
||||
bool operator==(const Node& otherNode) const { return _uuid == otherNode._uuid; }
|
||||
|
@ -48,8 +48,8 @@ public:
|
|||
char getType() const { return _type; }
|
||||
void setType(char type);
|
||||
|
||||
bool isReplicant() const { return _isReplicant; }
|
||||
void setIsReplicant(bool isReplicant) { _isReplicant = isReplicant; }
|
||||
bool isReplicated() const { return _isReplicated; }
|
||||
void setIsReplicated(bool isReplicated) { _isReplicated = isReplicated; }
|
||||
|
||||
const QUuid& getConnectionSecret() const { return _connectionSecret; }
|
||||
void setConnectionSecret(const QUuid& connectionSecret) { _connectionSecret = connectionSecret; }
|
||||
|
@ -92,7 +92,7 @@ private:
|
|||
Node& operator=(Node otherNode);
|
||||
|
||||
NodeType_t _type;
|
||||
bool _isReplicant { false };
|
||||
bool _isReplicated { false };
|
||||
|
||||
QUuid _connectionSecret;
|
||||
std::unique_ptr<NodeData> _linkedData;
|
||||
|
|
|
@ -654,9 +654,11 @@ void NodeList::parseNodeFromPacketStream(QDataStream& packetStream) {
|
|||
QUuid nodeUUID, connectionUUID;
|
||||
HifiSockAddr nodePublicSocket, nodeLocalSocket;
|
||||
NodePermissions permissions;
|
||||
bool isReplicant;
|
||||
bool isReplicated;
|
||||
|
||||
packetStream >> nodeType >> nodeUUID >> nodePublicSocket >> nodeLocalSocket >> permissions >> isReplicant;
|
||||
packetStream >> nodeType >> nodeUUID >> nodePublicSocket >> nodeLocalSocket >> permissions >> isReplicated;
|
||||
|
||||
qDebug() << "Node: " << nodeUUID << nodeType << isReplicated;
|
||||
|
||||
// if the public socket address is 0 then it's reachable at the same IP
|
||||
// as the domain server
|
||||
|
@ -667,7 +669,7 @@ void NodeList::parseNodeFromPacketStream(QDataStream& packetStream) {
|
|||
packetStream >> connectionUUID;
|
||||
|
||||
SharedNodePointer node = addOrUpdateNode(nodeUUID, nodeType, nodePublicSocket,
|
||||
nodeLocalSocket, permissions, isReplicant, connectionUUID);
|
||||
nodeLocalSocket, permissions, isReplicated, connectionUUID);
|
||||
}
|
||||
|
||||
void NodeList::sendAssignment(Assignment& assignment) {
|
||||
|
|
Loading…
Reference in a new issue