mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
fix recursive mutex lock, conditional, logging
This commit is contained in:
parent
bb68e777e6
commit
441b6d2813
3 changed files with 7 additions and 5 deletions
|
@ -425,7 +425,6 @@ qint64 LimitedNodeList::sendPacket(std::unique_ptr<NLPacket> packet, const Node&
|
|||
}
|
||||
|
||||
int LimitedNodeList::updateNodeWithDataFromPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer sendingNode) {
|
||||
QMutexLocker locker(&sendingNode->getMutex());
|
||||
|
||||
NodeData* linkedData = getOrCreateLinkedData(sendingNode);
|
||||
|
||||
|
|
|
@ -82,7 +82,8 @@ void Node::handleNodeIgnoreRequest(QSharedPointer<ReceivedMessage> packet) {
|
|||
// parse out the UUID being ignored from the packet
|
||||
QUuid ignoredUUID = QUuid::fromRfc4122(packet->readWithoutCopy(NUM_BYTES_RFC4122_UUID));
|
||||
|
||||
qDebug() << "Adding" << ignoredUUID << "to ignore set for" << _uuid;
|
||||
qDebug() << "Adding" << uuidStringWithoutCurlyBraces(ignoredUUID) << "to ignore set for"
|
||||
<< uuidStringWithoutCurlyBraces(_uuid);
|
||||
|
||||
// add the session UUID to the set of ignored ones for this listening node
|
||||
_ignoredNodeIDSet.insert(ignoredUUID);
|
||||
|
|
|
@ -21,10 +21,10 @@ void UsersScriptingInterface::ignore(const QUuid& nodeID) {
|
|||
auto nodeList = DependencyManager::get<NodeList>();
|
||||
|
||||
nodeList->eachMatchingNode([&nodeID](const SharedNodePointer& node)->bool {
|
||||
if (node->getType() != NodeType::AudioMixer || node->getType() != NodeType::AvatarMixer) {
|
||||
return false;
|
||||
} else {
|
||||
if (node->getType() == NodeType::AudioMixer || node->getType() == NodeType::AvatarMixer) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}, [&nodeID, &nodeList](const SharedNodePointer& destinationNode) {
|
||||
// create a reliable NLPacket with space for the ignore UUID
|
||||
|
@ -33,6 +33,8 @@ void UsersScriptingInterface::ignore(const QUuid& nodeID) {
|
|||
// write the node ID to the packet
|
||||
ignorePacket->write(nodeID.toRfc4122());
|
||||
|
||||
qDebug() << "Sending packet to ignore node" << uuidStringWithoutCurlyBraces(nodeID);
|
||||
|
||||
// send off this ignore packet reliably to the matching node
|
||||
nodeList->sendPacket(std::move(ignorePacket), *destinationNode);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue