summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Avatars/CombinedAvatarProvider.cpp4
-rw-r--r--Swiften/Examples/NetworkTool/main.cpp4
-rw-r--r--Swiften/QA/ClientTest/ClientTest.cpp2
-rw-r--r--Swiften/Serializer/StreamResumeSerializer.cpp2
-rw-r--r--Swiften/Serializer/StreamResumedSerializer.cpp2
5 files changed, 7 insertions, 7 deletions
diff --git a/Swiften/Avatars/CombinedAvatarProvider.cpp b/Swiften/Avatars/CombinedAvatarProvider.cpp
index 1bd74dd..30f9f52 100644
--- a/Swiften/Avatars/CombinedAvatarProvider.cpp
+++ b/Swiften/Avatars/CombinedAvatarProvider.cpp
@@ -38,7 +38,7 @@ void CombinedAvatarProvider::handleAvatarChanged(const JID& jid) {
}
boost::optional<std::string> newHash = getCombinedAvatarAndCache(jid);
if (newHash != oldHash) {
- SWIFT_LOG(debug) << "Avatar changed: " << jid << ": " << oldHash << " -> " << newHash << std::endl;
+ SWIFT_LOG(debug) << "Avatar changed: " << jid << ": " << oldHash << " -> " << (newHash ? newHash.get() : "NULL") << std::endl;
onAvatarChanged(jid);
}
}
@@ -48,7 +48,7 @@ boost::optional<std::string> CombinedAvatarProvider::getCombinedAvatarAndCache(c
boost::optional<std::string> hash;
for (size_t i = 0; i < providers.size() && !hash; ++i) {
hash = providers[i]->getAvatarHash(jid);
- SWIFT_LOG(debug) << "Provider " << providers[i] << ": " << hash << std::endl;
+ SWIFT_LOG(debug) << "Provider " << providers[i] << ": " << (hash ? hash.get() : "NULL") << std::endl;
}
if (hash) {
avatars[jid] = *hash;
diff --git a/Swiften/Examples/NetworkTool/main.cpp b/Swiften/Examples/NetworkTool/main.cpp
index 10a0aa6..77ba3f6 100644
--- a/Swiften/Examples/NetworkTool/main.cpp
+++ b/Swiften/Examples/NetworkTool/main.cpp
@@ -38,8 +38,8 @@ static void handleGetForwardPortRequestResponse(const boost::optional<NATPortMap
eventLoop.stop();
}
-static void handleRemovePortForwardingRequestResponse(bool result) {
- if (result) {
+static void handleRemovePortForwardingRequestResponse(const boost::optional<bool> result) {
+ if (result && result.get()) {
std::cerr << "Result: OK" << std::endl;
}
else {
diff --git a/Swiften/QA/ClientTest/ClientTest.cpp b/Swiften/QA/ClientTest/ClientTest.cpp
index e88e5ac..38f70db 100644
--- a/Swiften/QA/ClientTest/ClientTest.cpp
+++ b/Swiften/QA/ClientTest/ClientTest.cpp
@@ -31,7 +31,7 @@ static TestStage stage;
static ClientOptions options;
static void handleDisconnected(boost::optional<ClientError> e) {
- std::cout << "Disconnected: " << e << std::endl;
+ std::cout << "Disconnected: " << (e ? e.get().getType() : ClientError::UnknownError) << std::endl;
if (stage == FirstConnect) {
stage = Reconnect;
client->connect(options);
diff --git a/Swiften/Serializer/StreamResumeSerializer.cpp b/Swiften/Serializer/StreamResumeSerializer.cpp
index 902ab21..229b826 100644
--- a/Swiften/Serializer/StreamResumeSerializer.cpp
+++ b/Swiften/Serializer/StreamResumeSerializer.cpp
@@ -22,7 +22,7 @@ SafeByteArray StreamResumeSerializer::serialize(boost::shared_ptr<ToplevelElemen
XMLElement element("resume", "urn:xmpp:sm:2");
element.setAttribute("previd", e->getResumeID());
if (e->getHandledStanzasCount()) {
- element.setAttribute("h", boost::lexical_cast<std::string>(e->getHandledStanzasCount()));
+ element.setAttribute("h", boost::lexical_cast<std::string>(e->getHandledStanzasCount().get()));
}
return createSafeByteArray(element.serialize());
}
diff --git a/Swiften/Serializer/StreamResumedSerializer.cpp b/Swiften/Serializer/StreamResumedSerializer.cpp
index 6477af9..48dbe8f 100644
--- a/Swiften/Serializer/StreamResumedSerializer.cpp
+++ b/Swiften/Serializer/StreamResumedSerializer.cpp
@@ -22,7 +22,7 @@ SafeByteArray StreamResumedSerializer::serialize(boost::shared_ptr<ToplevelEleme
XMLElement element("resumed", "urn:xmpp:sm:2");
element.setAttribute("previd", e->getResumeID());
if (e->getHandledStanzasCount()) {
- element.setAttribute("h", boost::lexical_cast<std::string>(e->getHandledStanzasCount()));
+ element.setAttribute("h", boost::lexical_cast<std::string>(e->getHandledStanzasCount().get()));
}
return createSafeByteArray(element.serialize());
}