From 3c5f823621e170aaa5ae9f240335bea49d470da5 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Fri, 28 Mar 2014 01:16:05 +0100 Subject: Send a stanza error when receiving bad stanzas Whether this is a bad-request (missing XML attributes or elements) or an internal server error. --- src/xmpp/xmpp_component.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/xmpp/xmpp_component.hpp') diff --git a/src/xmpp/xmpp_component.hpp b/src/xmpp/xmpp_component.hpp index d4853c8..5a5d3d8 100644 --- a/src/xmpp/xmpp_component.hpp +++ b/src/xmpp/xmpp_component.hpp @@ -68,6 +68,12 @@ public: * describing the error. */ void send_stream_error(const std::string& message, const std::string& explanation); + /** + * Send error stanza, described in http://xmpp.org/rfcs/rfc6120.html#stanzas-error + */ + void send_stanza_error(const std::string& kind, const std::string& to, const std::string& from, + const std::string& id, const std::string& error_type, + const std::string& defined_condition, const std::string& text); /** * Send the closing signal for our document (not closing the connection though). */ -- cgit v1.2.3