Send a stanza error when receiving bad stanzas

Whether this is a bad-request (missing XML attributes or elements) or an
internal server error.
This commit is contained in:
Florent Le Coz
2014-03-28 01:16:05 +01:00
parent 2ffbfb71dd
commit 3c5f823621
2 changed files with 116 additions and 10 deletions
+6
View File
@@ -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).
*/