From 750dc6ff1eb7620c62589c6b7bda5e78e641f8a9 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Fri, 21 Nov 2014 13:35:57 +0100 Subject: add names to clients --- resource/listener.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'resource/listener.cpp') diff --git a/resource/listener.cpp b/resource/listener.cpp index e68b3d4..ae16da7 100644 --- a/resource/listener.cpp +++ b/resource/listener.cpp @@ -47,7 +47,7 @@ void Listener::acceptConnection() } Console::main()->log("Got a connection"); - Client client(connection); + Client client("Unknown Client" /*fixme: actual names!*/, connection); m_connections << client; connect(connection, &QLocalSocket::disconnected, this, &Listener::clientDropped); @@ -65,8 +65,8 @@ void Listener::clientDropped() QMutableListIterator it(m_connections); while (it.hasNext()) { const Client &client = it.next(); - if (client.m_socket == connection) { - Console::main()->log(" dropped..."); + if (client.socket == connection) { + Console::main()->log(QString(" dropped... %1").arg(client.name)); it.remove(); break; } -- cgit v1.2.3