mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
pack the size of the connection denied reason
This commit is contained in:
parent
a38cb56c1c
commit
adf2ce85f1
1 changed files with 3 additions and 2 deletions
|
@ -620,9 +620,10 @@ void DomainServer::handleConnectRequest(const QByteArray& packet, const HifiSock
|
|||
// this is an agent and we've decided we won't let them connect - send them a packet to deny connection
|
||||
|
||||
QByteArray utfString = reason.toUtf8();
|
||||
int payloadSize = utfString.size();
|
||||
qint16 payloadSize = utfString.size();
|
||||
|
||||
auto connectionDeniedPacket = NLPacket::create(PacketType::DomainConnectionDenied, payloadSize);
|
||||
auto connectionDeniedPacket = NLPacket::create(PacketType::DomainConnectionDenied, payloadSize + sizeof(payloadSize));
|
||||
connectionDeniedPacket->write(payloadSize);
|
||||
connectionDeniedPacket->write(utfString);
|
||||
|
||||
// tell client it has been refused.
|
||||
|
|
Loading…
Reference in a new issue