From 8dfe471ef28d21bb425ed174b048bd1bdf831765 Mon Sep 17 00:00:00 2001 From: Palakis Date: Sun, 23 Apr 2017 15:41:39 +0200 Subject: [PATCH] Server: small refactor --- WSServer.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/WSServer.cpp b/WSServer.cpp index 313eea81..c65cb570 100644 --- a/WSServer.cpp +++ b/WSServer.cpp @@ -113,12 +113,14 @@ void WSServer::onNewConnection() _clients << pSocket; _clMutex.unlock(); - QByteArray client_ip = pSocket->peerAddress().toString().toUtf8(); - blog(LOG_INFO, "new client connection from %s:%d", client_ip.constData(), pSocket->peerPort()); + QHostAddress clientAddr = pSocket->peerAddress(); + QString clientIp = clientAddr.toString(); + + blog(LOG_INFO, "new client connection from %s:%d", clientIp.toUtf8().constData(), pSocket->peerPort()); QString msg = QString(obs_module_text("OBSWebsocket.ConnectNotify.ClientIP")) + QString(" ") - + pSocket->peerAddress().toString(); + + clientAddr.toString(); Utils::SysTrayNotify(msg, QSystemTrayIcon::Information, QString(obs_module_text("OBSWebsocket.ConnectNotify.Title"))); }