mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 18:23:22 +02:00
ping reporter added to interface take 5
This commit is contained in:
parent
a5dc47eaab
commit
9313dbff52
1 changed files with 1 additions and 4 deletions
|
@ -78,13 +78,10 @@ AgentList::~AgentList() {
|
|||
}
|
||||
|
||||
void AgentList::timePingReply(sockaddr *agentAddress, unsigned char *packetData) {
|
||||
|
||||
char pingPacket[1 + sizeof(long long)];
|
||||
memcpy(pingPacket, packetData, 1 + sizeof(long long));
|
||||
for(AgentList::iterator agent = begin(); agent != end(); agent++) {
|
||||
if (socketMatch(agent->getPublicSocket(), agentAddress) ||
|
||||
socketMatch(agent->getLocalSocket(), agentAddress)) {
|
||||
int pingTime = usecTimestampNow() - *(long long *)(pingPacket+1);
|
||||
int pingTime = usecTimestampNow() - *(long long *)(packetData + 1);
|
||||
agent->setPingTime(pingTime / 1000);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue