summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-10-01 14:08:08 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-10-01 14:08:08 (GMT)
commit1d23fbe7acbfed25578958fb24aa75416f2ab737 (patch)
tree792e9f641900c263bc974f69debdf0494dfe4d9a /Swiften/Client/Client.cpp
parent90055ade3899ffa1d0ee700d218a259b39052270 (diff)
downloadswift-1d23fbe7acbfed25578958fb24aa75416f2ab737.zip
swift-1d23fbe7acbfed25578958fb24aa75416f2ab737.tar.bz2
Reuse server-generated resources.
Once a new method has been implemented in Client, this will re-use a server-generated resource for re-connections within the same Swift session. This provides a stable resource for the session, preventing MUC ghosts and similar artifacts due to server or network failures, without disclosing additional information like hostnames in the resource. Resolves: #563
Diffstat (limited to 'Swiften/Client/Client.cpp')
-rw-r--r--Swiften/Client/Client.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/Swiften/Client/Client.cpp b/Swiften/Client/Client.cpp
index 13e7a9b..fe9bc60 100644
--- a/Swiften/Client/Client.cpp
+++ b/Swiften/Client/Client.cpp
@@ -42,10 +42,20 @@ bool Client::isAvailable() {
return session_ && session_->getState() == ClientSession::Initialized;
}
+/** FIXME: implement */
+JID Client::getBoundJID() {
+ return JID();
+}
+
void Client::connect() {
connect(jid_.getDomain());
}
+void Client::connect(const JID& jid) {
+ jid_ = jid;
+ connect();
+}
+
void Client::connect(const String& host) {
assert(!connector_); // Crash on reconnect is here.
connector_ = Connector::create(host, &resolver_, connectionFactory_, timerFactory_);