Skip to content

Commit

Permalink
Fix third batch of production issues
Browse files Browse the repository at this point in the history
* Frozen stanzas containing subelements don't render.
* Could also be an issue with non-frozen stanzas; we'll see...
  • Loading branch information
dwd authored and Dave Cridland committed Nov 20, 2016
1 parent 080c231 commit 6924517
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deps/rapidxml
Submodule rapidxml updated 1 files
+9 −1 rapidxml.hpp
6 changes: 5 additions & 1 deletion src/stanza.cc
Expand Up @@ -53,10 +53,14 @@ Stanza::Stanza(const char *name, Jid const &from, Jid const &to, std::string con

void Stanza::freeze() {
if (!m_payload_str.empty()) return;
if (!m_payload) return;
if (!m_payload) {
m_node = nullptr;
return;
}
m_payload_str.assign(m_payload, m_payload_l);
METRE_LOG(Metre::Log::DEBUG, "Frozen stanza: " + m_payload_str);
m_payload = m_payload_str.data();
m_node = nullptr;
}

void Stanza::render(rapidxml::xml_document<> &d) {
Expand Down

0 comments on commit 6924517

Please sign in to comment.