summaryrefslogtreecommitdiffstats
path: root/Sluift
diff options
context:
space:
mode:
authorEdwin Mons <edwin.mons@isode.com>2013-11-19 17:46:03 (GMT)
committerEdwin Mons <edwin.mons@isode.com>2013-11-19 17:46:03 (GMT)
commitfb7437ec7e71407f1f6a44522be2f6f7c3792d05 (patch)
treebd2d533300ac79b8db5d2446f5060d819a7c5db9 /Sluift
parent6bae543da16d6579244de5c7c1ced88e66287265 (diff)
downloadswift-fb7437ec7e71407f1f6a44522be2f6f7c3792d05.zip
swift-fb7437ec7e71407f1f6a44522be2f6f7c3792d05.tar.bz2
Sluift: fix debug output for BOSH connections
Change-Id: I0bf798200e5e74e682eeab688f3ae79e49c73ed2
Diffstat (limited to 'Sluift')
-rw-r--r--Sluift/SluiftClient.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/Sluift/SluiftClient.cpp b/Sluift/SluiftClient.cpp
index bfae621..184fbd6 100644
--- a/Sluift/SluiftClient.cpp
+++ b/Sluift/SluiftClient.cpp
@@ -36,9 +36,6 @@ SluiftClient::SluiftClient(
client->onPresenceReceived.connect(boost::bind(&SluiftClient::handleIncomingPresence, this, _1));
client->getPubSubManager()->onEvent.connect(boost::bind(&SluiftClient::handleIncomingPubSubEvent, this, _1, _2));
client->getRoster()->onInitialRosterPopulated.connect(boost::bind(&SluiftClient::handleInitialRosterPopulated, this));
- if (globals->debug) {
- tracer = new ClientXMLTracer(client);
- }
}
SluiftClient::~SluiftClient() {
@@ -49,6 +46,9 @@ SluiftClient::~SluiftClient() {
void SluiftClient::connect() {
rosterReceived = false;
disconnectedError = boost::optional<ClientError>();
+ if (globals->debug) {
+ tracer = new ClientXMLTracer(client, options.boshURL.isEmpty()? false: true);
+ }
client->connect(options);
}
@@ -56,6 +56,9 @@ void SluiftClient::connect(const std::string& host, int port) {
rosterReceived = false;
options.manualHostname = host;
options.manualPort = port;
+ if (globals->debug) {
+ tracer = new ClientXMLTracer(client, options.boshURL.isEmpty()? false: true);
+ }
client->connect(options);
}