summaryrefslogtreecommitdiff
path: root/louloulibs
diff options
context:
space:
mode:
Diffstat (limited to 'louloulibs')
-rw-r--r--louloulibs/network/dns_handler.hpp2
-rw-r--r--louloulibs/xmpp/adhoc_commands_handler.cpp9
2 files changed, 3 insertions, 8 deletions
diff --git a/louloulibs/network/dns_handler.hpp b/louloulibs/network/dns_handler.hpp
index 0148156..78ffe4d 100644
--- a/louloulibs/network/dns_handler.hpp
+++ b/louloulibs/network/dns_handler.hpp
@@ -14,7 +14,7 @@ class Poller;
class DNSHandler
{
public:
- DNSHandler(std::shared_ptr<Poller> poller);
+ explicit DNSHandler(std::shared_ptr<Poller> poller);
~DNSHandler() = default;
DNSHandler(const DNSHandler&) = delete;
diff --git a/louloulibs/xmpp/adhoc_commands_handler.cpp b/louloulibs/xmpp/adhoc_commands_handler.cpp
index d3ede2d..040d0ff 100644
--- a/louloulibs/xmpp/adhoc_commands_handler.cpp
+++ b/louloulibs/xmpp/adhoc_commands_handler.cpp
@@ -62,13 +62,8 @@ XmlNode AdhocCommandsHandler::handle_request(const std::string& executor_jid, co
"adhocsession"s + sessionid + executor_jid));
}
auto session_it = this->sessions.find(std::make_pair(sessionid, executor_jid));
- if (session_it == this->sessions.end())
- {
- XmlSubNode error(command_node, ADHOC_NS":error");
- error["type"] = "modify";
- XmlSubNode condition(error, STANZA_NS":bad-request");
- }
- else if (action == "execute" || action == "next" || action == "complete")
+ if ((session_it != this->sessions.end()) &&
+ (action == "execute" || action == "next" || action == "complete"))
{
// execute the step
AdhocSession& session = session_it->second;