summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Swiften/Queries/Request.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/Swiften/Queries/Request.cpp b/Swiften/Queries/Request.cpp
index ac361cc..609d67b 100644
--- a/Swiften/Queries/Request.cpp
+++ b/Swiften/Queries/Request.cpp
@@ -17,23 +17,21 @@ void Request::send() {
}
bool Request::handleIQ(boost::shared_ptr<IQ> iq) {
+ bool handled = false;
if (iq->getID() == id_) {
if (iq->getType() == IQ::Result) {
handleResponse(iq->getPayloadOfSameType(payload_), boost::optional<Error>());
- if (autoDeleteBehavior_ == AutoDeleteAfterResponse) {
- MainEventLoop::deleteLater(this);
- }
- return true;
}
else {
// FIXME: Get proper error
handleResponse(boost::shared_ptr<Payload>(), boost::optional<Error>(Error::UndefinedCondition));
- return true;
}
+ if (autoDeleteBehavior_ == AutoDeleteAfterResponse) {
+ MainEventLoop::deleteLater(this);
+ }
+ handled = true;
}
- else {
- return false;
- }
+ return handled;
}
}