X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcommon%2Fprotocols%2Flegacy%2Flegacypeer.cpp;h=a0afebdb50d70f073db28efcf3f39fe81f0ac600;hb=d6f3eedebc7f9619b04dffc5f48faa792950fdcd;hp=98a7afa9a46b0145662643b3db87ae5c65c9feb2;hpb=c33010eadab46ad7bceeb6605df0e918d0446ec4;p=quassel.git diff --git a/src/common/protocols/legacy/legacypeer.cpp b/src/common/protocols/legacy/legacypeer.cpp index 98a7afa9..a0afebdb 100644 --- a/src/common/protocols/legacy/legacypeer.cpp +++ b/src/common/protocols/legacy/legacypeer.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2014 by the Quassel Project * + * Copyright (C) 2005-2016 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -170,12 +170,12 @@ void LegacyPeer::handleHandshakeMessage(const QVariant &msg) socket()->setProperty("UseCompression", true); #endif - handle(ClientRegistered(m["CoreFeatures"].toUInt(), m["Configured"].toBool(), m["StorageBackends"].toList(), m["SupportSsl"].toBool(), QString())); + handle(ClientRegistered(m["CoreFeatures"].toUInt(), m["Configured"].toBool(), m["StorageBackends"].toList(), m["SupportSsl"].toBool(), m["AuthBackends"].toList())); } else if (msgType == "CoreSetupData") { QVariantMap map = m["SetupData"].toMap(); - handle(SetupData(map["AdminUser"].toString(), map["AdminPasswd"].toString(), map["Backend"].toString(), map["ConnectionProperties"].toMap())); + handle(SetupData(map["AdminUser"].toString(), map["AdminPasswd"].toString(), map["Backend"].toString(), map["ConnectionProperties"].toMap(), map["AuthBackend"].toString(), map["AuthProperties"].toMap())); } else if (msgType == "CoreSetupReject") { @@ -242,14 +242,15 @@ void LegacyPeer::dispatch(const ClientRegistered &msg) { m["MsgType"] = "ClientInitAck"; m["CoreFeatures"] = msg.coreFeatures; m["StorageBackends"] = msg.backendInfo; + m["AuthBackends"] = msg.authBackendInfo; // FIXME only in compat mode m["ProtocolVersion"] = protocolVersion; m["SupportSsl"] = msg.sslSupported; m["SupportsCompression"] = socket()->property("UseCompression").toBool(); // this property gets already set in the ClientInit handler - // This is only used for old v10 clients (pre-0.5) - m["CoreInfo"] = msg.coreInfo; + // This is only used for display by really old v10 clients (pre-0.5), and we no longer set this + m["CoreInfo"] = QString(); m["LoginEnabled"] = m["Configured"] = msg.coreConfigured; @@ -264,6 +265,11 @@ void LegacyPeer::dispatch(const SetupData &msg) map["AdminPasswd"] = msg.adminPassword; map["Backend"] = msg.backend; map["ConnectionProperties"] = msg.setupData; + + // Auth backend properties. + // XXX: make these optional using core features. + map["AuthBackend"] = msg.authenticator; + map["AuthProperties"] = msg.authSetupData; QVariantMap m; m["MsgType"] = "CoreSetupData";