/soc/2015/koosha/main: 8b425175a5ca: count incoming stanzas only...
Koosha Khajehmoogahi
koosha at posteo.de
Mon Aug 10 13:38:24 EDT 2015
Changeset: 8b425175a5ca3d0eff0686d3340fde88f06271ac
Author: Koosha Khajehmoogahi <koosha at posteo.de>
Date: 2015-08-10 19:23 +0200
Branch: default
URL: https://hg.pidgin.im/soc/2015/koosha/main/rev/8b425175a5ca
Description:
count incoming stanzas only if server has SM feature
diffstat:
libpurple/protocols/jabber/jabber.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diffs (28 lines):
diff --git a/libpurple/protocols/jabber/jabber.c b/libpurple/protocols/jabber/jabber.c
--- a/libpurple/protocols/jabber/jabber.c
+++ b/libpurple/protocols/jabber/jabber.c
@@ -398,14 +398,16 @@ void jabber_process_packet(JabberStream
/* Count received stanzas to include when acking
* via <a/> (stream management) to the server */
- if (purple_strequal(name, "iq") ||
- purple_strequal(name, "presence") ||
- purple_strequal(name, "message"))
- {
- if (G_UNLIKELY(G_MAXUINT32 == js->stanzas_recvd))
- js->stanzas_recvd = 0;
- else
- js->stanzas_recvd++;
+ if (js->server_caps & JABBER_CAP_SM) {
+ if (purple_strequal(name, "iq") ||
+ purple_strequal(name, "presence") ||
+ purple_strequal(name, "message"))
+ {
+ if (G_UNLIKELY(G_MAXUINT32 == js->stanzas_recvd))
+ js->stanzas_recvd = 0;
+ else
+ js->stanzas_recvd++;
+ }
}
if (purple_strequal(name, "iq")) {
More information about the Commits
mailing list