diff options
-rw-r--r-- | Sluift/SluiftClient.cpp | 9 |
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 @@ -37,7 +37,4 @@ SluiftClient::SluiftClient( 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); - } } @@ -50,4 +47,7 @@ void SluiftClient::connect() { rosterReceived = false; disconnectedError = boost::optional<ClientError>(); + if (globals->debug) { + tracer = new ClientXMLTracer(client, options.boshURL.isEmpty()? false: true); + } client->connect(options); } @@ -57,4 +57,7 @@ void SluiftClient::connect(const std::string& host, int port) { options.manualHostname = host; options.manualPort = port; + if (globals->debug) { + tracer = new ClientXMLTracer(client, options.boshURL.isEmpty()? false: true); + } client->connect(options); } |