From 41be22a7bb3b4f78beae017a8cb823591c08fad5 Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Fri, 24 May 2019 15:22:33 -0700 Subject: [PATCH] ubuntu build fix and CR fix --- domain-server/src/DomainServer.cpp | 2 +- libraries/networking/src/NodeList.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/domain-server/src/DomainServer.cpp b/domain-server/src/DomainServer.cpp index e8401c64c7..9a2aaca18b 100644 --- a/domain-server/src/DomainServer.cpp +++ b/domain-server/src/DomainServer.cpp @@ -1175,7 +1175,7 @@ void DomainServer::sendDomainListToNode(const SharedNodePointer& node, quint64 r extendedHeaderStream << limitedNodeList->getAuthenticatePackets(); extendedHeaderStream << nodeData->getLastDomainCheckinTimestamp(); extendedHeaderStream << requestPacketReceiveTime; - extendedHeaderStream << duration_cast(p_high_resolution_clock::now().time_since_epoch()).count(); + extendedHeaderStream << quint64(duration_cast(p_high_resolution_clock::now().time_since_epoch()).count()); auto domainListPackets = NLPacketList::create(PacketType::DomainList, extendedHeader); // always send the node their own UUID back diff --git a/libraries/networking/src/NodeList.cpp b/libraries/networking/src/NodeList.cpp index aabeabbbf5..ae2a495431 100644 --- a/libraries/networking/src/NodeList.cpp +++ b/libraries/networking/src/NodeList.cpp @@ -416,7 +416,7 @@ void NodeList::sendDomainServerCheckIn() { packetStream << FingerprintUtils::getMachineFingerprint(); } - packetStream << duration_cast(p_high_resolution_clock::now().time_since_epoch()).count(); + packetStream << quint64(duration_cast(p_high_resolution_clock::now().time_since_epoch()).count()); // pack our data to send to the domain-server including // the hostname information (so the domain-server can see which place name we came in on) @@ -662,7 +662,7 @@ void NodeList::processDomainServerList(QSharedPointer message) qint64 pingLagTime = (now - qint64(connectRequestTimestamp)) / qint64(USECS_PER_MSEC); - qint64 domainServerRequestLag = (qint64(connectRequestTimestamp) - qint64(connectRequestTimestamp)) / qint64(USECS_PER_MSEC); + qint64 domainServerRequestLag = (qint64(domainServerRequestReceiveTime) - qint64(connectRequestTimestamp)) / qint64(USECS_PER_MSEC); quint64 domainServerCheckinProcessingTime = domainServerPingSendTime - domainServerRequestReceiveTime; qint64 domainServerResponseLag = (now - qint64(domainServerPingSendTime)) / qint64(USECS_PER_MSEC);