From ccd61ee5a2d4aaac9623382baaf9e0568885947f Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Wed, 12 Jun 2013 16:13:44 -0700 Subject: [PATCH] Found the problem we were having: the domain server was reporting back all kinds of things as our ID. --- domain-server/src/main.cpp | 35 ++++++++++++++++++----------------- interface/src/Application.cpp | 4 ---- 2 files changed, 18 insertions(+), 21 deletions(-) diff --git a/domain-server/src/main.cpp b/domain-server/src/main.cpp index b1e2117db3..b8f66b0641 100644 --- a/domain-server/src/main.cpp +++ b/domain-server/src/main.cpp @@ -135,25 +135,26 @@ int main(int argc, const char * argv[]) if (numInterestTypes > 0) { // if the agent has sent no types of interest, assume they want nothing but their own ID back for (AgentList::iterator agent = agentList->begin(); agent != agentList->end(); agent++) { - if (!agent->matches((sockaddr*) &agentPublicAddress, (sockaddr*) &agentLocalAddress, agentType) - && memchr(agentTypesOfInterest, agent->getType(), numInterestTypes)) { - // this is not the agent themselves - // and this is an agent of a type in the passed agent types of interest - // or the agent did not pass us any specific types they are interested in + if (!agent->matches((sockaddr*) &agentPublicAddress, (sockaddr*) &agentLocalAddress, agentType)) { + if (memchr(agentTypesOfInterest, agent->getType(), numInterestTypes)) { + // this is not the agent themselves + // and this is an agent of a type in the passed agent types of interest + // or the agent did not pass us any specific types they are interested in - if (memchr(SOLO_AGENT_TYPES, agent->getType(), sizeof(SOLO_AGENT_TYPES)) == NULL) { - // this is an agent of which there can be multiple, just add them to the packet - // don't send avatar agents to other avatars, that will come from avatar mixer - if (agentType != AGENT_TYPE_AVATAR || agent->getType() != AGENT_TYPE_AVATAR) { - currentBufferPos = addAgentToBroadcastPacket(currentBufferPos, &(*agent)); - } + if (memchr(SOLO_AGENT_TYPES, agent->getType(), sizeof(SOLO_AGENT_TYPES)) == NULL) { + // this is an agent of which there can be multiple, just add them to the packet + // don't send avatar agents to other avatars, that will come from avatar mixer + if (agentType != AGENT_TYPE_AVATAR || agent->getType() != AGENT_TYPE_AVATAR) { + currentBufferPos = addAgentToBroadcastPacket(currentBufferPos, &(*agent)); + } - } else { - // solo agent, we need to only send newest - if (newestSoloAgents[agent->getType()] == NULL || - newestSoloAgents[agent->getType()]->getWakeMicrostamp() < agent->getWakeMicrostamp()) { - // we have to set the newer solo agent to add it to the broadcast later - newestSoloAgents[agent->getType()] = &(*agent); + } else { + // solo agent, we need to only send newest + if (newestSoloAgents[agent->getType()] == NULL || + newestSoloAgents[agent->getType()]->getWakeMicrostamp() < agent->getWakeMicrostamp()) { + // we have to set the newer solo agent to add it to the broadcast later + newestSoloAgents[agent->getType()] = &(*agent); + } } } } else { diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index b02afe2b0e..d864fb86dd 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -827,8 +827,6 @@ void Application::terminate() { static void sendAvatarVoxelURLMessage(const QUrl& url) { uint16_t ownerID = AgentList::getInstance()->getOwnerID(); - qDebug() << "me" << ownerID << url; - if (ownerID == UNKNOWN_AGENT_ID) { return; // we don't yet know who we are } @@ -850,8 +848,6 @@ static void processAvatarVoxelURLMessage(unsigned char *packetData, size_t dataB packetData += sizeof(agentID); dataBytes -= sizeof(agentID); - qDebug() << "them" << agentID << QUrl::fromEncoded(QByteArray((char*)packetData, dataBytes)); - // make sure the agent exists Agent* agent = AgentList::getInstance()->agentWithID(agentID); if (!agent || !agent->getLinkedData()) {