mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 20:57:09 +02:00
Avoid string copy
This commit is contained in:
parent
497e311a2e
commit
ceea5143e1
1 changed files with 5 additions and 3 deletions
|
@ -3820,9 +3820,11 @@ void Application::domainChanged(const QString& domainHostname) {
|
|||
}
|
||||
|
||||
void Application::handleDomainConnectionDeniedPacket(QSharedPointer<NLPacket> packet) {
|
||||
quint16 size;
|
||||
packet->readPrimitive(&size);
|
||||
QString reason = QString::fromUtf8(packet->read(size));
|
||||
// Read deny reason from packet
|
||||
quint16 reasonSize;
|
||||
packet->readPrimitive(&reasonSize);
|
||||
QString reason = QString::fromUtf8(packet->getPayload() + packet->pos(), reasonSize);
|
||||
packet->seek(packet->pos() + reasonSize);
|
||||
|
||||
// output to the log so the user knows they got a denied connection request
|
||||
// and check and signal for an access token so that we can make sure they are logged in
|
||||
|
|
Loading…
Reference in a new issue