From 364df4daf04e6a01917d140f89eff1e249b5efc3 Mon Sep 17 00:00:00 2001 From: woogerboy21 Date: Mon, 24 Aug 2015 11:38:24 -0400 Subject: [PATCH] Extend the login protocol to send the client id (as optional) --- cockatrice/src/remoteclient.cpp | 2 ++ common/pb/session_commands.proto | 1 + 2 files changed, 3 insertions(+) diff --git a/cockatrice/src/remoteclient.cpp b/cockatrice/src/remoteclient.cpp index 96ee1eea..e149082b 100644 --- a/cockatrice/src/remoteclient.cpp +++ b/cockatrice/src/remoteclient.cpp @@ -12,6 +12,7 @@ #include "pb/event_server_identification.pb.h" #include "settingscache.h" #include "main.h" +#include "version_string.h" static const unsigned int protocolVersion = 14; @@ -112,6 +113,7 @@ void RemoteClient::doLogin() cmdLogin.set_user_name(userName.toStdString()); cmdLogin.set_password(password.toStdString()); cmdLogin.set_clientid(settingsCache->getClientID().toStdString()); + cmdLogin.set_clientver(VERSION_STRING); PendingCommand *pend = prepareSessionCommand(cmdLogin); connect(pend, SIGNAL(finished(Response, CommandContainer, QVariant)), this, SLOT(loginResponse(Response))); sendCommand(pend); diff --git a/common/pb/session_commands.proto b/common/pb/session_commands.proto index d5564f3e..22dad27d 100644 --- a/common/pb/session_commands.proto +++ b/common/pb/session_commands.proto @@ -44,6 +44,7 @@ message Command_Login { optional string user_name = 1; optional string password = 2; optional string clientid = 3; + optional string clientver = 4; } message Command_Message {