diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2011-10-28 18:34:25 +0100 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2011-10-31 09:37:52 +0000 |
commit | 9cf653e93ba9beb8ff2df73627cd2b1f5bedf6bc (patch) | |
tree | cf0a272dcdd2adc5720b348d4d67d14f348c8b8c /tests/twisted/roster | |
parent | c3b6d2101aa5257a6f1ec927f3b0f3b3911cd2a6 (diff) |
roster: ignore multiple replies to roster query.
The XMPP server running on vk.com is buggy, and replies to our roster
query twice. Gabble just blindly assumed that any <iq type='result'>
with a roster in it was the singular reply to our singular query. This
is a pretty reasonable assumption but this buggy server violates it, and
Gabble calls tp_base_contact_list_set_list_received() more than once,
which triggers a critical in that function.
A more invasive fix would use wocky_porter_send_iq_async() rather than
scraping all the roster IQs out of everything using the LM API, but I
wanted to quickly fix a bug on a Friday afternoon.
Fixes: <https://bugs.freedesktop.org/show_bug.cgi?id=42186>
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'tests/twisted/roster')
-rw-r--r-- | tests/twisted/roster/test-roster.py | 5 |
1 files changed, 5 insertions, 0 deletions
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', |