summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-10-21 18:17:56 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-10-21 18:19:33 (GMT)
commit07402c4e3451f2084a1c3ddc5bacfb38a66899a7 (patch)
tree99fc399a23f633a8d8f119394bea2edda2a082b4 /Swift/Controllers
parent7c8329aa2efd8d89ea100772620f10b40a589406 (diff)
downloadswift-contrib-07402c4e3451f2084a1c3ddc5bacfb38a66899a7.zip
swift-contrib-07402c4e3451f2084a1c3ddc5bacfb38a66899a7.tar.bz2
Fixed authentication problems on reconnect.
Release-Notes: Fixed a bug where reconnecting to a different account after signout would fail authenticating.
Diffstat (limited to 'Swift/Controllers')
-rw-r--r--Swift/Controllers/MainController.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp
index d95557f..6b9c447 100644
--- a/Swift/Controllers/MainController.cpp
+++ b/Swift/Controllers/MainController.cpp
@@ -424,7 +424,9 @@ void MainController::performLoginFromCachedCredentials() {
/* In case we're in the middle of another login, make sure they don't overlap */
client_->disconnect();
}
- if (boundJID_.isValid() && jid_.isBare()) {
+ /* If we logged in with a bare JID, and we have a full bound JID, re-login with the
+ * bound JID to try and keep dynamically assigned resources */
+ if (boundJID_.isValid() && jid_.isBare() && boundJID_.toBare() == jid_) {
client_->connect(boundJID_);
} else {
client_->connect();