summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-12-11 11:07:51 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-12-11 11:07:51 (GMT)
commitd9ce3491e818d96f3dc0154e9e5d30228420483c (patch)
treec5dd1833c189254fb3c0ba63a324b0ab65676093
parent4b65bb3fc0cfa55cf0533406877da20fb4da9e7b (diff)
downloadswift-contrib-d9ce3491e818d96f3dc0154e9e5d30228420483c.zip
swift-contrib-d9ce3491e818d96f3dc0154e9e5d30228420483c.tar.bz2
Use bare JIDs as profile names.
-rw-r--r--Swift/Controllers/MainController.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp
index 018948b..c1d8682 100644
--- a/Swift/Controllers/MainController.cpp
+++ b/Swift/Controllers/MainController.cpp
@@ -359,8 +359,8 @@ void MainController::performLoginFromCachedCredentials() {
statusTracker_ = new StatusTracker();
}
if (!client_) {
- storages_ = storagesFactory_->createStorages(jid_);
- certificateStorage_ = certificateStorageFactory_->createCertificateStorage(jid_);
+ storages_ = storagesFactory_->createStorages(jid_.toBare());
+ certificateStorage_ = certificateStorageFactory_->createCertificateStorage(jid_.toBare());
certificateTrustChecker_ = new CertificateStorageTrustChecker(certificateStorage_);
client_ = new Swift::Client(eventLoop_, &networkFactories_, jid_, password_, storages_);
client_->setCertificateTrustChecker(certificateTrustChecker_);
@@ -440,7 +440,7 @@ void MainController::handleDisconnected(const boost::optional<ClientError>& erro
case ClientError::InvalidCAError:
case ClientError::InvalidServerIdentityError:
// FIXME: Popup a dialog
- message = "Certificate error";
+ message = "Certificate error (" + boost::lexical_cast<std::string>(error->getType()) + ")";
// FIXME: Only do this if the user accepts the certificate
//certificateStorage_->addCertificate(certificateTrustChecker_->getLastCertificate());
break;