From ee005f19d97af497d780eb3883e5fb64060b24b4 Mon Sep 17 00:00:00 2001 From: Mark Peng Date: Fri, 28 Jun 2013 11:17:52 -0700 Subject: [PATCH] ping reporter added to interface take 2 --- avatar-mixer/src/main.cpp | 1 - interface/src/Application.cpp | 4 +--- interface/src/Application.h | 1 - libraries/shared/src/AgentList.cpp | 1 + 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/avatar-mixer/src/main.cpp b/avatar-mixer/src/main.cpp index 2da10d5573..aace967564 100644 --- a/avatar-mixer/src/main.cpp +++ b/avatar-mixer/src/main.cpp @@ -93,7 +93,6 @@ int main(int argc, const char* argv[]) { } if (agentList->getAgentSocket()->receive(agentAddress, packetData, &receivedBytes)) { - switch (packetData[0]) { case PACKET_HEADER_HEAD_DATA: // grab the agent ID from the packet diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index f16823eb55..55db7fa50b 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -161,8 +161,7 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : _packetCount(0), _packetsPerSecond(0), _bytesPerSecond(0), - _bytesCount(0), - _pingSentTime(0) + _bytesCount(0) { _applicationStartupTime = startup_time; _window->setWindowTitle("Interface"); @@ -774,7 +773,6 @@ void sendPingPacket() { // Every second, check the frame rates and other stuff void Application::timer() { gettimeofday(&_timerEnd, NULL); - _pingSentTime = usecTimestampNow(); sendPingPacket(); _fps = (float)_frameCount / ((float)diffclock(&_timerStart, &_timerEnd) / 1000.f); diff --git a/interface/src/Application.h b/interface/src/Application.h index e5d00efb3a..ee7bab209e 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -222,7 +222,6 @@ private: timeval _applicationStartupTime; timeval _timerStart, _timerEnd; timeval _lastTimeIdle; - long long _pingSentTime; bool _justStarted; Stars _stars; diff --git a/libraries/shared/src/AgentList.cpp b/libraries/shared/src/AgentList.cpp index 75339b82d7..2371c454f7 100644 --- a/libraries/shared/src/AgentList.cpp +++ b/libraries/shared/src/AgentList.cpp @@ -98,6 +98,7 @@ void AgentList::processAgentData(sockaddr *senderAddress, unsigned char *packetD break; } case PACKET_HEADER_PING: { + // _agentSocket.send(senderAddress, &PACKET_HEADER_PING_REPLY, 1); char pingPacket[1 + sizeof(long long)]; memcpy(pingPacket, packetData, 1 + sizeof(long long)); pingPacket[0] = PACKET_HEADER_PING_REPLY;