[ADD] Proper stanza limits

This commit is contained in:
LDA 2024-10-25 18:03:05 +02:00
commit 7c60ab28cb
18 changed files with 74 additions and 39 deletions

View file

@ -175,7 +175,7 @@ IQDiscoGet(ParseeData *args, XMPPComponent *jabber, XMLElement *stanza)
}
XMLAddChild(iq_reply, query);
XMPPSendStanza(jabber, iq_reply);
XMPPSendStanza(jabber, iq_reply, args->config->max_stanza_size);
XMLFreeElement(iq_reply);
(void) args;
@ -412,7 +412,7 @@ IQGet(ParseeData *args, XMLElement *stanza, XMPPThread *thr)
XMPPShoveCommandList(thr->info->m, to, q);
XMLAddChild(iq_reply, q);
}
XMPPSendStanza(jabber, iq_reply);
XMPPSendStanza(jabber, iq_reply, args->config->max_stanza_size);
XMLFreeElement(iq_reply);
}
else if (XMLookForTKV(stanza, "vCard", "xmlns", "vcard-temp"))
@ -450,7 +450,7 @@ IQGet(ParseeData *args, XMLElement *stanza, XMPPThread *thr)
XMLAddChild(iqVCard, vCard);
}
XMPPSendStanza(jabber, iqVCard);
XMPPSendStanza(jabber, iqVCard, args->config->max_stanza_size);
XMLFreeElement(iqVCard);
Free(to_matrix);
Free(name);
@ -477,7 +477,7 @@ IQGet(ParseeData *args, XMLElement *stanza, XMPPThread *thr)
XMLAddChild(iqVCard, vCard);
}
XMPPSendStanza(jabber, iqVCard);
XMPPSendStanza(jabber, iqVCard, args->config->max_stanza_size);
XMLFreeElement(iqVCard);
Free(to_matrix);
Free(name);
@ -531,7 +531,7 @@ IQGet(ParseeData *args, XMLElement *stanza, XMPPThread *thr)
XMLAddChild(reply, ps);
}
XMPPSendStanza(jabber, reply);
XMPPSendStanza(jabber, reply, args->config->max_stanza_size);
XMLFreeElement(reply);
Free(to_matrix);
@ -569,7 +569,7 @@ IQGet(ParseeData *args, XMLElement *stanza, XMPPThread *thr)
XMLAddChild(query, version);
XMLAddChild(iq_reply, query);
XMPPSendStanza(jabber, iq_reply);
XMPPSendStanza(jabber, iq_reply, args->config->max_stanza_size);
XMLFreeElement(iq_reply);
}
else