summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2011-10-31 09:38:35 +0000
committerWill Thompson <will.thompson@collabora.co.uk>2011-10-31 09:38:35 +0000
commit08da102662f74cf084e4d2bdfc86f2b15e33ca66 (patch)
treeaf8f31d588711048fb4ea7440f7904cb40c78fe1
parentf9529b7d27b0cc9edc9b7c39573c533963d87079 (diff)
parent9cf653e93ba9beb8ff2df73627cd2b1f5bedf6bc (diff)
Merge branch 'telepathy-gabble-0.12'
-rw-r--r--src/roster.c10
-rw-r--r--tests/twisted/roster/test-roster.py5
2 files changed, 15 insertions, 0 deletions
diff --git a/src/roster.c b/src/roster.c
index d7c05272c..3a818ff0a 100644
--- a/src/roster.c
+++ b/src/roster.c
@@ -1377,6 +1377,16 @@ got_roster_iq (GabbleRoster *roster,
return FALSE;
}
+ if (sub_type == WOCKY_STANZA_SUB_TYPE_RESULT && priv->received)
+ {
+ /* <https://bugs.freedesktop.org/show_bug.cgi?id=42186>: some super-buggy
+ * XMPP server running on vk.com sends its reply to our roster query twice.
+ */
+ DEBUG ("The server sent replied to our roster query more than once! "
+ "Ignoring this reply");
+ return FALSE;
+ }
+
process_roster (roster, query_node);
if (sub_type == WOCKY_STANZA_SUB_TYPE_RESULT)
diff --git a/tests/twisted/roster/test-roster.py b/tests/twisted/roster/test-roster.py
index bd892568a..04fee09d8 100644
--- a/tests/twisted/roster/test-roster.py
+++ b/tests/twisted/roster/test-roster.py
@@ -32,6 +32,11 @@ def test(q, bus, conn, stream):
stream.send(event.stanza)
+ # Regression test for <https://bugs.freedesktop.org/show_bug.cgi?id=42186>:
+ # some super-buggy XMPP server running on vk.com sends its reply to our
+ # roster query twice. This used to crash Gabble.
+ stream.send(event.stanza)
+
# slight implementation detail: TpBaseContactList emits ContactsChanged
# before it announces its channels
s = q.expect('dbus-signal', signal='ContactsChanged',