X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fclient%2Fclientsyncer.cpp;h=93d73bb6889d991a3133f0b1a068cca557c24781;hb=fd8d472f11d024b2df59027f719fbf3387315ec5;hp=b7b2088d43e4c3684fba1185d0759458bcb5c73f;hpb=d1a410b43b09e31472b860bc5f5bbf9c253c047e;p=quassel.git
diff --git a/src/client/clientsyncer.cpp b/src/client/clientsyncer.cpp
index b7b2088d..93d73bb6 100644
--- a/src/client/clientsyncer.cpp
+++ b/src/client/clientsyncer.cpp
@@ -157,10 +157,16 @@ void ClientSyncer::coreSocketConnected() {
QVariantMap clientInit;
clientInit["MsgType"] = "ClientInit";
clientInit["ClientVersion"] = Global::quasselVersion;
- clientInit["ClientDate"] = Global::quasselDate;
- clientInit["ClientBuild"] = Global::quasselBuild; // this is a minimum, since we probably won't update for every commit
+ clientInit["ClientBuild"] = 860; // FIXME legacy!
+ clientInit["ClientDate"] = Global::quasselBuildDate;
+ clientInit["ProtocolVersion"] = Global::protocolVersion;
clientInit["UseSsl"] = coreConnectionInfo["useSsl"];
-
+#ifndef QT_NO_COMPRESS
+ clientInit["UseCompression"] = true;
+#else
+ clientInit["UseCompression"] = false;
+#endif
+
SignalProxy::writeDataToDevice(socket, clientInit);
}
@@ -180,9 +186,10 @@ void ClientSyncer::coreSocketDisconnected() {
void ClientSyncer::clientInitAck(const QVariantMap &msg) {
// Core has accepted our version info and sent its own. Let's see if we accept it as well...
- if(msg["CoreBuild"].toUInt() < Global::coreBuildNeeded) {
+ if(msg.contains("CoreBuild") && msg["CoreBuild"].toUInt() < 732 // legacy!
+ || !msg.contains("CoreBuild") && msg["ProtocolVersion"].toUInt() < Global::clientNeedsProtocol) {
emit connectionError(tr("The Quassel Core you are trying to connect to is too old!
"
- "Need at least a Core Version %1 (Build >= %2) to connect.").arg(Global::quasselVersion).arg(Global::coreBuildNeeded));
+ "Need at least core/client protocol v%1 to connect.").arg(Global::clientNeedsProtocol));
disconnectFromCore();
return;
}
@@ -206,6 +213,12 @@ void ClientSyncer::clientInitAck(const QVariantMap &msg) {
}
#endif
+#ifndef QT_NO_COMPRESS
+ if(msg["SupportsCompression"].toBool()) {
+ socket->setProperty("UseCompression", true);
+ }
+#endif
+
if(!msg["Configured"].toBool()) {
// start wizard
emit startCoreSetup(msg["StorageBackends"].toList());