summaryrefslogtreecommitdiffstats
path: root/resource/listener.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'resource/listener.cpp')
-rw-r--r--resource/listener.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/resource/listener.cpp b/resource/listener.cpp
index da1edc3..645cb8c 100644
--- a/resource/listener.cpp
+++ b/resource/listener.cpp
@@ -2,6 +2,7 @@
2 2
3#include "common/console.h" 3#include "common/console.h"
4#include "common/commands.h" 4#include "common/commands.h"
5#include "common/commands/handshake_generated.h"
5 6
6#include <QLocalSocket> 7#include <QLocalSocket>
7#include <QTimer> 8#include <QTimer>
@@ -130,11 +131,12 @@ void Listener::processClientBuffer(Client &client)
130 client.commandBuffer.remove(0, headerSize + size); 131 client.commandBuffer.remove(0, headerSize + size);
131 132
132 switch (commandId) { 133 switch (commandId) {
133 case Commands::HandshakeCommand: 134 case Commands::HandshakeCommand: {
134 client.name = data; 135 auto buffer = Toynadi::GetHandshake(data.constData());
135 Console::main()->log(QString(" Handshake from %1").arg(client.name)); 136 Console::main()->log(QString(" Handshake from %1").arg(buffer->name()->c_str()));
136 //TODO: reply? 137 //TODO: reply?
137 break; 138 break;
139 }
138 default: 140 default:
139 // client.hasSentCommand = true; 141 // client.hasSentCommand = true;
140 break; 142 break;