mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 16:45:10 +00:00
[FIX] Add id field, use correct freeing function
This commit is contained in:
parent
be15a67cba
commit
9039f0ce69
1 changed files with 10 additions and 1 deletions
|
|
@ -405,15 +405,24 @@ ShoveStanza(HashMap *content, XMLElement *stanza)
|
|||
{
|
||||
char *encoded_stanza = NULL;
|
||||
Stream *str_writer = StrStreamWriter(&encoded_stanza);
|
||||
if (!stanza || !content)
|
||||
{
|
||||
StreamClose(str_writer);
|
||||
return content;
|
||||
}
|
||||
|
||||
XMLEncode(str_writer, stanza);
|
||||
StreamFlush(str_writer);
|
||||
StreamClose(str_writer);
|
||||
|
||||
JsonFree(HashMapSet(content,
|
||||
JsonValueFree(HashMapSet(content,
|
||||
"at.kappach.at.parsee.stanza",
|
||||
JsonValueString(encoded_stanza)
|
||||
));
|
||||
JsonValueFree(HashMapSet(content,
|
||||
"at.kappach.at.parsee.id",
|
||||
JsonValueString(HashMapGet(stanza->attrs, "id"))
|
||||
));
|
||||
|
||||
Free(encoded_stanza);
|
||||
return content;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue