mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 21:15:11 +00:00
[ADD] Proper stanza limits
This commit is contained in:
parent
ce8bbb5540
commit
7c60ab28cb
18 changed files with 74 additions and 39 deletions
|
|
@ -228,16 +228,20 @@ ExportStanza(StanzaBuilder *builder)
|
|||
}
|
||||
|
||||
void
|
||||
WriteoutStanza(StanzaBuilder *builder, XMPPComponent *jabber)
|
||||
WriteoutStanza(StanzaBuilder *builder, XMPPComponent *jabber, size_t max)
|
||||
{
|
||||
XMLElement *elem;
|
||||
if (!builder || !jabber)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!max)
|
||||
{
|
||||
max = 10000; /* XMPP recommended limit */
|
||||
}
|
||||
|
||||
elem = ExportStanza(builder);
|
||||
XMPPSendStanza(jabber, elem);
|
||||
XMPPSendStanza(jabber, elem, max);
|
||||
XMLFreeElement(elem);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue