mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 07:47:30 +02:00
add OS type to connect message
This commit is contained in:
parent
b95515933f
commit
2ed5e8aefb
6 changed files with 23 additions and 4 deletions
|
@ -127,7 +127,8 @@ void DomainGatekeeper::processConnectRequestPacket(QSharedPointer<ReceivedMessag
|
||||||
<< "and machine fingerprint" << nodeConnection.machineFingerprint
|
<< "and machine fingerprint" << nodeConnection.machineFingerprint
|
||||||
<< "user" << username
|
<< "user" << username
|
||||||
<< "reason" << QString(nodeConnection.connectReason ? "SilentDomainDisconnect" : "Connect")
|
<< "reason" << QString(nodeConnection.connectReason ? "SilentDomainDisconnect" : "Connect")
|
||||||
<< "previous connection uptime" << nodeConnection.previousConnectionUpTime/USECS_PER_MSEC << "msec";
|
<< "previous connection uptime" << nodeConnection.previousConnectionUpTime/USECS_PER_MSEC << "msec"
|
||||||
|
<< "\nsysinfo" << nodeConnection.SystemInfo;
|
||||||
|
|
||||||
// signal that we just connected a node so the DomainServer can get it a list
|
// signal that we just connected a node so the DomainServer can get it a list
|
||||||
// and broadcast its presence right away
|
// and broadcast its presence right away
|
||||||
|
|
|
@ -36,6 +36,9 @@ NodeConnectionData NodeConnectionData::fromDataStream(QDataStream& dataStream, c
|
||||||
// now the machine fingerprint
|
// now the machine fingerprint
|
||||||
dataStream >> newHeader.machineFingerprint;
|
dataStream >> newHeader.machineFingerprint;
|
||||||
|
|
||||||
|
// and the operating system type
|
||||||
|
dataStream >> newHeader.SystemInfo;
|
||||||
|
|
||||||
dataStream >> newHeader.connectReason;
|
dataStream >> newHeader.connectReason;
|
||||||
|
|
||||||
dataStream >> newHeader.previousConnectionUpTime;
|
dataStream >> newHeader.previousConnectionUpTime;
|
||||||
|
|
|
@ -31,9 +31,9 @@ public:
|
||||||
QString placeName;
|
QString placeName;
|
||||||
QString hardwareAddress;
|
QString hardwareAddress;
|
||||||
QUuid machineFingerprint;
|
QUuid machineFingerprint;
|
||||||
|
QString SystemInfo;
|
||||||
quint32 connectReason;
|
quint32 connectReason;
|
||||||
quint64 previousConnectionUpTime;
|
quint64 previousConnectionUpTime;
|
||||||
|
|
||||||
QByteArray protocolVersion;
|
QByteArray protocolVersion;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -418,6 +418,20 @@ void NodeList::sendDomainServerCheckIn() {
|
||||||
auto accountManager = DependencyManager::get<AccountManager>();
|
auto accountManager = DependencyManager::get<AccountManager>();
|
||||||
packetStream << FingerprintUtils::getMachineFingerprint();
|
packetStream << FingerprintUtils::getMachineFingerprint();
|
||||||
|
|
||||||
|
QString systemInfo;
|
||||||
|
#if defined Q_OS_WIN
|
||||||
|
systemInfo = "OS:Windows";
|
||||||
|
#elif defined Q_OS_OSX
|
||||||
|
systemInfo = "OS:OSX";
|
||||||
|
#elif defined Q_OS_LINUX
|
||||||
|
systemInfo = "OS:Linux";
|
||||||
|
#elif defined Q_OS_ANDROID
|
||||||
|
systemInfo = "OS:Android";
|
||||||
|
#else
|
||||||
|
systemInfo = "OS:Unknown";
|
||||||
|
#endif
|
||||||
|
packetStream << systemInfo;
|
||||||
|
|
||||||
packetStream << _connectReason;
|
packetStream << _connectReason;
|
||||||
|
|
||||||
if (_nodeDisconnectTimestamp < _nodeConnectTimestamp) {
|
if (_nodeDisconnectTimestamp < _nodeConnectTimestamp) {
|
||||||
|
|
|
@ -72,7 +72,7 @@ PacketVersion versionForPacketType(PacketType packetType) {
|
||||||
return static_cast<PacketVersion>(DomainConnectionDeniedVersion::IncludesExtraInfo);
|
return static_cast<PacketVersion>(DomainConnectionDeniedVersion::IncludesExtraInfo);
|
||||||
|
|
||||||
case PacketType::DomainConnectRequest:
|
case PacketType::DomainConnectRequest:
|
||||||
return static_cast<PacketVersion>(DomainConnectRequestVersion::HasReason);
|
return static_cast<PacketVersion>(DomainConnectRequestVersion::HasSystemInfo);
|
||||||
|
|
||||||
case PacketType::DomainServerAddedNode:
|
case PacketType::DomainServerAddedNode:
|
||||||
return static_cast<PacketVersion>(DomainServerAddedNodeVersion::PermissionsGrid);
|
return static_cast<PacketVersion>(DomainServerAddedNodeVersion::PermissionsGrid);
|
||||||
|
|
|
@ -346,7 +346,8 @@ enum class DomainConnectRequestVersion : PacketVersion {
|
||||||
HasMachineFingerprint,
|
HasMachineFingerprint,
|
||||||
AlwaysHasMachineFingerprint,
|
AlwaysHasMachineFingerprint,
|
||||||
HasTimestamp,
|
HasTimestamp,
|
||||||
HasReason
|
HasReason,
|
||||||
|
HasSystemInfo
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class DomainConnectionDeniedVersion : PacketVersion {
|
enum class DomainConnectionDeniedVersion : PacketVersion {
|
||||||
|
|
Loading…
Reference in a new issue