Changeset - 56de41bb976b
[Not reviewed]
0 1 0
Jan Kaluza - 9 years ago 2016-02-10 22:22:05
jkaluza@redhat.com
Swiften: Check if the legacyname contains the resource and do not append our in that case
1 file changed with 5 insertions and 1 deletions:
0 comments (0 inline, 0 general)
backends/swiften/main.cpp
Show inline comments
 
@@ -301,7 +301,11 @@ class SwiftenPlugin : public NetworkPlugin, Swift::XMPPParserClient {
 

	
 
		void handleLoginRequest(const std::string &user, const std::string &legacyName, const std::string &password) {
 
			LOG4CXX_INFO(logger, user << ": connecting as " << legacyName);
 
			boost::shared_ptr<Swift::Client> client = boost::make_shared<Swift::Client>(Swift::JID(legacyName + "/Spectrum"), password, m_factories);
 
			Swift::JID jid(legacyName);
 
			if (legacyName.find("/") == std::string::npos) {
 
				jid = Swift::JID(legacyName + "/Spectrum");
 
			}
 
			boost::shared_ptr<Swift::Client> client = boost::make_shared<Swift::Client>(jid, password, m_factories);
 
			m_users[user] = client;
 
			client->setAlwaysTrustCertificates();
 
			client->onConnected.connect(boost::bind(&SwiftenPlugin::handleSwiftConnected, this, user));
0 comments (0 inline, 0 general)