Hello community, here is the log from the commit of package telepathy-gabble for openSUSE:Factory checked in at Mon Jul 11 10:18:50 CEST 2011. -------- --- GNOME/telepathy-gabble/telepathy-gabble.changes 2011-06-03 10:50:31.000000000 +0200 +++ /mounts/work_src_done/STABLE/telepathy-gabble/telepathy-gabble.changes 2011-06-27 11:14:38.000000000 +0200 @@ -1,0 +2,36 @@ +Sun Jun 26 14:12:38 CEST 2011 - dimstar@opensuse.org + +- Update to version 0.13.2: + + Enhancements: + - autogen.sh now honours the NOCONFIGURE environment variable, + for compatibility with gnome-autogen.sh. + + Fixes: + - fdo#27361: Empty aliases stored on the roster are now ignored + Additionally, if we've cached a contact's JID as their alias + on our roster (because we couldn't find a better alias), and + we come across a better alias for the contact (via a PEP + nickname push, or by fetching their vCard for some other + reason), we now replace the JID with that better alias. + - fdo#38603: We now handle receiving unavailable presence from + our contacts before we receive the roster correctly. + Previously, this would cause those contacts to be stuck in + state 'unknown' rather than 'offline' until they next came + online. + - Don't make assertions about TpChannelIface:handle-type's + value in GabbleFileTransferChannel's set_property + implementation. The property's not really writeable (the + getter returns a constant value for it anyway) and this fixes + a crash with telepathy-glib 0.15.2, in which the default + value has changed from NONE to UNKNOWN. + +------------------------------------------------------------------- +Fri Jun 17 00:44:04 CEST 2011 - vuntz@opensuse.org + +- Update to version 0.13.1: + + Fixes: + - We now interoperate with Google Mail's brand new + implementation of Jingle. Some of the workarounds added are + temporary, and some are not. (fdo#38352) + - Compare codec names case-insensitively. (fdo#38264) + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- telepathy-gabble-0.13.0.tar.bz2 New: ---- telepathy-gabble-0.13.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ telepathy-gabble.spec ++++++ --- /var/tmp/diff_new_pack.RnYJ4w/_old 2011-07-11 10:14:47.000000000 +0200 +++ /var/tmp/diff_new_pack.RnYJ4w/_new 2011-07-11 10:14:47.000000000 +0200 @@ -18,7 +18,7 @@ Name: telepathy-gabble -Version: 0.13.0 +Version: 0.13.2 Release: 1 License: LGPLv2.1+ Summary: XMPP connection manager for Telepathy ++++++ telepathy-gabble-0.13.0.tar.bz2 -> telepathy-gabble-0.13.2.tar.bz2 ++++++ ++++ 4306 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/ChangeLog new/telepathy-gabble-0.13.2/ChangeLog --- old/telepathy-gabble-0.13.0/ChangeLog 2011-06-02 20:35:05.000000000 +0200 +++ new/telepathy-gabble-0.13.2/ChangeLog 2011-06-24 21:00:27.000000000 +0200 @@ -1,3 +1,358 @@ +commit ea425adba81a2681af4c4ed7184972deae378331 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-24 19:57:18 +0100 + + Version 0.13.2 + +commit ac2df5eacd34852d6d6ddf584bd2394812e66ad6 +Merge: cf9ed52 fcfbc06 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-24 19:55:03 +0100 + + Merge branch 'telepathy-gabble-0.12' + + Conflicts: + NEWS + configure.ac + src/presence-cache.c + +commit fcfbc06d3f679a8266f13921ff3771bd07cf7f24 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-24 19:50:08 +0100 + + bump version to 0.12.3.1 + +commit a1d33d82c8645303e279e20033d8f96bc6f6e567 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-24 18:48:03 +0100 + + Version 0.12.3 + +commit 18a8b11833af6b8b2e62e4ee3bd3037a8b5b2c2f +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-24 18:47:45 +0100 + + NEWS for 0.12.3 + +commit 712bbe2b59ed5746cee50604956b0cb842ea9cc4 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-24 19:35:23 +0100 + + FTChannel: don't assert about handle-type in setter + + telepathy-glib's default for TpChannelIface:handle-type has changed in + 0.15.2: it used to be NONE, and now it's UNKNOWN. This broke both Salut + and Gabble… + + But as the comment says, it's not meaningfully writeable. It's not at + all obviously why this assertion is there. + +commit 276abd5ff84d635eb5f8cd3eee56978f75631722 +Author: Colin Walters <walters@verbum.org> +Date: 2011-06-24 18:42:23 +0100 + + Honor NOCONFIGURE for compatibility with gnome-autogen.sh + + See also: + http://people.gnome.org/~walters/docs/build-api.txt + +commit 1ff589c1e89cf9bb90f59a961c23f2ffa9c3dff0 +Merge: cdff268 f7cdb73 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-24 15:31:29 +0100 + + Merge branch 'fd.o-38603-initial-contact-presence' into telepathy-gabble-0.12 + +commit f7cdb735461e81b428f9a5d776e2b2487263c8aa +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-23 16:53:23 +0100 + + Cite fd.o#38603 (presence-before-roster doesn't work) + +commit fa0990a9810b9629d32dd53840aa415e2d5dbe7d +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-23 16:39:59 +0100 + + Roster: don't emit presence updates for available contacts + + Previously, when we received the roster we would announce that the + presence of everyone on it we're subscribed to has changed, just for the + side-effect of signalling that offline contacts really are offline, not + just unknown. + + This offended me. :) + +commit d1f7941c3343b1c498e55543c66ae72fa2b880f5 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-23 16:28:20 +0100 + + initial-contact-presence: reduce duplication of presences + +commit e0cda613a166e9c538ccdcd8cf5d5feae72a2596 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-23 16:19:11 +0100 + + GabblePresence: start in state Unknown + + This has the effect of ensuring that receiving <presence + type='unavailable'/> for a contact not previously in the presence cache + will not cause a change from Unknown to Unknown to be signalled. + +commit 66788076de9fb0062d685346d4bb5c444befd3ea +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-23 15:58:11 +0100 + + PresenceCache: discard UNKNOWN presences in maybe_remove + + In various places, gabble_presence_cache_maybe_remove() is called to + allow the cache to relinquish its grip on content-free offline + presences. It should also be able to drop unknown presences: they're + basically equivalent, based on whether or not the contact is on our + roster. + + Specifically, this means that UNKNOWN presences for contacts received + before the roster has arrived do not linger in the cache, and hence + these contacts are correctly signalled as OFFLINE when the roster + arrives. + + Really, I think a better fix would be to change the presence cache to + not have this distinction between Unknown and Offline: it's completely + based on whether or not the contact is (known to be) on the roster, and + this is reflected in the way that the handler for incoming <presence/> + passes a different value into the presence cache based on whether or not + the contact is on the roster. But this would be a much more invasive + change, so I'm not prepared to make it just yet. + +commit 01d600f1f9f52ac7f021fed2a75e6aa8e7168274 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-23 15:46:28 +0100 + + Presence: debug GabblePresenceId names where possible + + (I may have missed a few places, but these are the two I came across.) + +commit b2616cbb5e25fcd28dbeaad68055b18a399db8b5 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-23 13:48:27 +0100 + + Build GEnum/GFlags for enums in connection.h + + Specifically, I want a GEnum for GabblePresenceId so I can include the + stringy versions in debug strings. + +commit a6c0404419c7c84924e1b98783860f8ad99aa18f +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-23 12:51:58 +0100 + + initial-contact-presence: split expect from assertion + + I think this makes things clearer: we're expecting some presences to + change in response to the roster arriving, and we're expecting the + changes to be these. + + This means that the test failing manifests itself as an assertion + failure, not a timeout. + +commit cf9ed5291015fd97b2121dcf38933e8bf885013d +Merge: 0b6f5f5 cdff268 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-21 14:24:00 +0100 + + Merge branch 'telepathy-gabble-0.12' + +commit cdff268c3965046baa37aac100cceda3e9aafe37 +Merge: 63c4d27 6df83a1 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-21 14:21:26 +0100 + + Merge branch 'aliases' into telepathy-gabble-0.12 + + Reviewed-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> + +commit 6df83a17ff312dc3ad99c79bb40163eba687449c +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-21 12:25:05 +0100 + + Look for better aliases if roster says name=jid. + + When we discover that a contact doesn't have an alias at all, we fall + back to their JID, and write this to the roster (as we do for any other + alias we use, to spare our users' precious bandwidth). + + This is fine and all, but it means that we ignore any subsequent updates + from the contact to say that they have a better alias. For instance, we + might get a PEP nickname update, or fetch their vCard for some other + reason (getting an avatar, ContactInfo, &c &c). In those cases, we would + like to have any better alias obtained passively to replace the JID + fallback. This is only ever passive: we still don't query for a better + alias if the roster says it's the JID. (Clever users can set the alias + to the empty string, which has the effect of forcing a refresh.) + + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=27361 + +commit 7a221f03f2a8796895bd48febe1b04168d1b5a1a +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-20 17:00:56 +0100 + + servicetest: Stringify events more nicely + +commit e619592d8bfbba0d0679f918f514fdfc08b829cb +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-20 16:51:08 +0100 + + gabbletest: make stanza events subclasses of Event + + This looks neater to me. + +commit a85a67c99ab9085eafc8afe17437253a082e0e08 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-20 16:13:49 +0100 + + Ignore empty name='' attributes on the roster. + + Previously, if a roster item had an empty name='' attribute, Gabble + would be content to show this to the user, and never try PEP or their + vCard for a better nickname. + + The empty alias is never useful. + +commit 6ba62283b7052ff49cc223b65d4ac06937ec1043 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-20 16:09:50 +0100 + + rostertest: support name='' attrs in roster pushes + +commit 7ac26b27921b9217066c68c2a3333ff616c69a31 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-20 13:26:58 +0100 + + test-save-alias-to-roster: use contact list fetching helper + +commit c033c160dfd91a9253aaaac7804922067116cb4e +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-20 13:17:55 +0100 + + test-save-alias-to-roster: expect AddMembers to return + + This is an ancient FIXME. I think it's safe to say that we depend on a + new enough tp-glib. + +commit 0b6f5f529ac72a479956663175cb6205c41ea394 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-16 18:02:03 +0100 + + Bump nano-version to 0.13.1.1 + +commit 17e3e817f5faa349f08b8b541c1ecd65f83234a4 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-16 17:46:27 +0100 + + Version 0.13.1 + +commit bd88fdcc79243df03d3fa31259696e1743bd7b78 +Merge: a2d6254 63c4d27 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-16 17:45:23 +0100 + + Merge branch 'telepathy-gabble-0.12' + + Conflicts: + NEWS + configure.ac + +commit 63c4d275abab3aad53923f556473ee902965e2b6 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-16 17:37:36 +0100 + + National novel versus ionization + +commit 5e59111c54577650316749a262d6c891f415e603 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-16 17:22:32 +0100 + + version 0.12.2 + +commit 052ca8131c8e145714372db249efd9bd04c70f94 +Merge: e8e2d23 a88dd55 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-16 17:07:55 +0100 + + Merge branch 'gtalk-jingle-workarounds' into telepathy-gabble-0.12 + + These aren't perfect, but they'll do for now. + + https://bugs.freedesktop.org/show_bug.cgi?id=38352 + +commit a88dd5529d038f32b3c01b9eb6109eaa10e88604 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-15 18:08:08 +0100 + + Add a test for working around GMail + +commit 714e066f8b566f107cef819d4ae6fb7786c8739f +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-15 17:53:17 +0100 + + JingleSession: special-case that GMail can't modify contents. + + In theory, it can, because it now speaks modern Jingle which has this + concept. But in practice it cannot, at least for now. + +commit b1e774762806b1e0446aaccd42657437e96b01a2 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-15 17:44:40 +0100 + + MediaChannel: clean up setting ImmutableStreams + +commit bbf7da0ca74749cfec6701e9cd16f8d7595c4bb8 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-15 17:38:31 +0100 + + RTP: use video_rtp/_rtcp component names with GMail + +commit fcc5df48e59c4141151fe6c9d8348a1b676cc88c +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-15 17:13:12 +0100 + + JingleContent: work around GMail omitting content creators + +commit a29379f10e8ff96bfcd206cd92a12cff25bc5c72 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-15 16:51:33 +0100 + + PresenceCache: set Omits Content Creators quirk for GMail + +commit 519504984f9ec70657fdf0bff0eb580bee253237 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-15 16:50:12 +0100 + + JingleSession: refactor quirk-checking code. + +commit cd4a003443ff6f9b6e022e9a21146e59c2c56463 +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-13 20:15:09 +0100 + + TransportIface: correct a contents vs. candidates thinko + +commit a2d6254646182c10d55290f8b3ce53d7a399ca96 +Merge: 0a7c31e e8e2d23 +Author: Olivier Crête <olivier.crete@collabora.com> +Date: 2011-06-13 15:16:07 -0400 + + Merge branch 'telepathy-gabble-0.12' + +commit e8e2d23490846ebabb7c640bb905b7549883b3af +Author: Olivier Crête <olivier.crete@collabora.com> +Date: 2011-06-13 14:20:53 -0400 + + jingle-media-rtp: Codec encoding names are not case sensitive + +commit 0a7c31ea51c5096e86111f73f157bb87f0f46d0e +Author: Will Thompson <will.thompson@collabora.co.uk> +Date: 2011-06-02 19:46:38 +0100 + + Post-release nano-version and NEWS bump to 0.13.1 + commit c4a118850bcaccd6502b6a19cbb61238de1d157e Author: Will Thompson <will.thompson@collabora.co.uk> Date: 2011-06-02 19:20:59 +0100 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/NEWS new/telepathy-gabble-0.13.2/NEWS --- old/telepathy-gabble-0.13.0/NEWS 2011-06-02 20:20:28.000000000 +0200 +++ new/telepathy-gabble-0.13.2/NEWS 2011-06-24 20:56:32.000000000 +0200 @@ -1,3 +1,48 @@ +telepathy-gabble 0.13.2 (2011-06-24) +==================================== + +The “Minotaur Shock” release. This includes all of the fixes from the +0.12.3 release (and no other changes since 0.13.1). + +Enhancements: + +• autogen.sh now honours the NOCONFIGURE environment variable, for + compatibility with gnome-autogen.sh. (Colin Walters) + +Fixes: + +• Empty aliases stored on the roster are now ignored. Additionally, if + we've cached a contact's JID as their alias on our roster (because we + couldn't find a better alias), and we come across a better alias for + the contact (via a PEP nickname push, or by fetching their vCard for + some other reason), we now replace the JID with that better alias. + (fd.o#27361, Will) + +• We now handle receiving unavailable presence from our contacts before + we receive the roster correctly. Previously, this would cause those + contacts to be stuck in state 'unknown' rather than 'offline' until + they next came online. (fd.o#38603, Will) + +• Don't make assertions about TpChannelIface:handle-type's value in + GabbleFileTransferChannel's set_property implementation. The + property's not really writeable—the getter returns a constant value + for it anyway—and this fixes a crash with telepathy-glib 0.15.2, in + which the default value has changed from NONE to UNKNOWN. (Will) + +telepathy-gabble 0.13.1 (2011-06-16) +==================================== + +The “old piano” release. This includes all of the fixes from the 0.12.2 +release (and no other changes since 0.13.0). + +Fixes: + +• We now interoperate with Google Mail's brand new implementation of + Jingle. Some of the workarounds added are temporary, and some are + not. (fd.o#38352, Will) + +• Compare codec names case-insensitively. (fd.o#38264, Olivier) + telepathy-gabble 0.13.0 (2011-06-02) ==================================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/configure.ac new/telepathy-gabble-0.13.2/configure.ac --- old/telepathy-gabble-0.13.0/configure.ac 2011-06-02 20:20:44.000000000 +0200 +++ new/telepathy-gabble-0.13.2/configure.ac 2011-06-24 20:57:13.000000000 +0200 @@ -9,7 +9,7 @@ m4_define([gabble_major_version], [0]) m4_define([gabble_minor_version], [13]) -m4_define([gabble_micro_version], [0]) +m4_define([gabble_micro_version], [2]) m4_define([gabble_nano_version], [0]) # Some magic diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/src/Makefile.am new/telepathy-gabble-0.13.2/src/Makefile.am --- old/telepathy-gabble-0.13.0/src/Makefile.am 2011-06-02 18:07:07.000000000 +0200 +++ new/telepathy-gabble-0.13.2/src/Makefile.am 2011-06-24 20:53:16.000000000 +0200 @@ -184,6 +184,7 @@ vcard-manager.c enumtype_sources = \ + $(top_srcdir)/src/connection.h \ $(top_srcdir)/src/jingle-factory.h \ $(top_srcdir)/src/presence.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/src/conn-aliasing.c new/telepathy-gabble-0.13.2/src/conn-aliasing.c --- old/telepathy-gabble-0.13.0/src/conn-aliasing.c 2011-05-05 12:39:20.000000000 +0200 +++ new/telepathy-gabble-0.13.2/src/conn-aliasing.c 2011-06-23 18:01:41.000000000 +0200 @@ -880,14 +880,35 @@ GabblePresence *pres; const gchar *tmp, *jid; gchar *resource = NULL; + gboolean roster_alias_was_jid = FALSE; g_return_val_if_fail (NULL != conn, GABBLE_CONNECTION_ALIAS_NONE); g_return_val_if_fail (GABBLE_IS_CONNECTION (conn), GABBLE_CONNECTION_ALIAS_NONE); g_return_val_if_fail (tp_handle_is_valid (contact_handles, handle, NULL), GABBLE_CONNECTION_ALIAS_NONE); + jid = tp_handle_inspect (contact_handles, handle); + g_assert (NULL != jid); + tmp = gabble_roster_handle_get_name (conn->roster, handle); - if (NULL != tmp) + if (!tp_strdiff (tmp, jid)) + { + /* Normally, we prefer whatever we've cached on the roster, to avoid + * wasting bandwidth checking for aliases by repeatedly fetching the + * vCard, and (more importantly) to prefer anything the local user set + * over what the contact says their name is. + * + * However, if the alias stored on the roster is just the contact's JID, + * we check for better aliases that we happen to have received from other + * sources (maybe a PEP nick update, or a vCard we've fetched for the + * avatar, or whatever). If we can't find anything better, we'll use the + * JID, and still say that it came from the roster: this means we don't + * defeat negative caching for contacts who genuinely don't have an + * alias. + */ + roster_alias_was_jid = TRUE; + } + else if (!tp_str_empty (tmp)) { maybe_set (alias, tmp); return GABBLE_CONNECTION_ALIAS_FROM_ROSTER; @@ -925,10 +946,6 @@ } } - jid = tp_handle_inspect (contact_handles, handle); - g_assert (NULL != jid); - - /* MUC handles have the nickname in the resource */ if (gabble_decode_jid (jid, NULL, NULL, &resource) && NULL != resource) @@ -949,9 +966,11 @@ } } - /* otherwise just take their jid */ + /* otherwise just take their jid, which may have been specified on the roster + * as the contact's alias. */ maybe_set (alias, jid); - return GABBLE_CONNECTION_ALIAS_FROM_JID; + return roster_alias_was_jid ? GABBLE_CONNECTION_ALIAS_FROM_ROSTER + : GABBLE_CONNECTION_ALIAS_FROM_JID; } static void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/src/connection.h new/telepathy-gabble-0.13.2/src/connection.h --- old/telepathy-gabble-0.13.0/src/connection.h 2011-05-05 12:39:20.000000000 +0200 +++ new/telepathy-gabble-0.13.2/src/connection.h 2011-06-24 20:53:16.000000000 +0200 @@ -52,21 +52,23 @@ /* order must match array of statuses in conn-presence.c */ /* in increasing order of presence */ +/*< prefix=GABBLE_PRESENCE >*/ typedef enum { GABBLE_PRESENCE_OFFLINE = 0, GABBLE_PRESENCE_UNKNOWN, GABBLE_PRESENCE_ERROR, - GABBLE_PRESENCE_LAST_UNAVAILABLE = GABBLE_PRESENCE_ERROR, + GABBLE_PRESENCE_LAST_UNAVAILABLE = GABBLE_PRESENCE_ERROR, /*< skip >*/ GABBLE_PRESENCE_HIDDEN, GABBLE_PRESENCE_XA, GABBLE_PRESENCE_AWAY, GABBLE_PRESENCE_DND, GABBLE_PRESENCE_AVAILABLE, GABBLE_PRESENCE_CHAT, - NUM_GABBLE_PRESENCES + NUM_GABBLE_PRESENCES /*< skip >*/ } GabblePresenceId; +/*< flags >*/ typedef enum { GABBLE_CONNECTION_FEATURES_NONE = 0, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/src/ft-channel.c new/telepathy-gabble-0.13.2/src/ft-channel.c --- old/telepathy-gabble-0.13.0/src/ft-channel.c 2011-05-05 12:39:20.000000000 +0200 +++ new/telepathy-gabble-0.13.2/src/ft-channel.c 2011-06-24 20:53:16.000000000 +0200 @@ -361,13 +361,10 @@ case PROP_CONNECTION: self->priv->connection = g_value_get_object (value); break; + /* these properties are writable in the interface, but not actually + * meaningfully changeable on this channel, so we do nothing */ case PROP_HANDLE_TYPE: - g_assert (g_value_get_uint (value) == 0 - || g_value_get_uint (value) == TP_HANDLE_TYPE_CONTACT); - break; case PROP_CHANNEL_TYPE: - /* these properties are writable in the interface, but not actually - * meaningfully changeable on this channel, so we do nothing */ break; case PROP_STATE: gabble_file_transfer_channel_set_state ( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/src/jingle-content.c new/telepathy-gabble-0.13.2/src/jingle-content.c --- old/telepathy-gabble-0.13.0/src/jingle-content.c 2011-05-05 12:39:20.000000000 +0200 +++ new/telepathy-gabble-0.13.2/src/jingle-content.c 2011-06-24 19:36:27.000000000 +0200 @@ -507,6 +507,8 @@ GabbleJingleTransportIface *trans = NULL; JingleDialect dialect = gabble_jingle_session_get_dialect (c->session); + priv->created_by_us = FALSE; + desc_node = lm_message_node_get_child_any_ns (content_node, "description"); trans_node = lm_message_node_get_child_any_ns (content_node, "transport"); creator = lm_message_node_get_attribute (content_node, "creator"); @@ -549,6 +551,19 @@ } else { + if (creator == NULL && + gabble_jingle_session_peer_has_quirk (c->session, + QUIRK_GOOGLE_WEBMAIL_CLIENT)) + { + if (gabble_jingle_content_creator_is_initiator (c)) + creator = "initiator"; + else + creator = "responder"; + + DEBUG ("Working around GMail omitting creator=''; assuming '%s'", + creator); + } + if ((trans_node == NULL) || (creator == NULL) || (name == NULL)) { SET_BAD_REQ ("missing required content attributes or elements"); @@ -577,7 +592,6 @@ priv->transport_ns = g_strdup (ns); } - priv->created_by_us = FALSE; if (senders == NULL) priv->senders = get_default_senders (c); else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/src/jingle-media-rtp.c new/telepathy-gabble-0.13.2/src/jingle-media-rtp.c --- old/telepathy-gabble-0.13.0/src/jingle-media-rtp.c 2011-05-05 12:39:20.000000000 +0200 +++ new/telepathy-gabble-0.13.2/src/jingle-media-rtp.c 2011-06-24 19:36:27.000000000 +0200 @@ -337,7 +337,9 @@ dialect = gabble_jingle_session_get_dialect (content->session); if (priv->media_type == JINGLE_MEDIA_TYPE_VIDEO && - JINGLE_IS_GOOGLE_DIALECT (dialect)) + (JINGLE_IS_GOOGLE_DIALECT (dialect) || + gabble_jingle_session_peer_has_quirk (content->session, + QUIRK_GOOGLE_WEBMAIL_CLIENT))) { jingle_transport_google_set_component_name (gtrans, "video_rtp", 1); jingle_transport_google_set_component_name (gtrans, "video_rtcp", 2); @@ -618,7 +620,7 @@ return FALSE; } - if (tp_strdiff (new_c->name, old_c->name)) + if (g_ascii_strcasecmp (new_c->name, old_c->name)) { g_set_error (e, domain, code, "tried to change codec %u's name from %s to %s", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/src/jingle-session.c new/telepathy-gabble-0.13.2/src/jingle-session.c --- old/telepathy-gabble-0.13.0/src/jingle-session.c 2011-05-05 12:39:20.000000000 +0200 +++ new/telepathy-gabble-0.13.2/src/jingle-session.c 2011-06-24 19:36:27.000000000 +0200 @@ -631,6 +631,21 @@ JingleState state, JingleReason termination_reason, const gchar *text); static GabbleJingleContent *_get_any_content (GabbleJingleSession *session); +gboolean +gabble_jingle_session_peer_has_quirk ( + GabbleJingleSession *self, + const gchar *quirk) +{ + GabbleJingleSessionPrivate *priv = self->priv; + GabblePresence *presence = gabble_presence_cache_get ( + priv->conn->presence_cache, self->peer); + + return (presence != NULL && + priv->peer_resource != NULL && + gabble_presence_resource_has_caps (presence, priv->peer_resource, + gabble_capability_set_predicate_has, quirk)); +} + static gboolean lookup_content (GabbleJingleSession *sess, const gchar *name, @@ -668,13 +683,8 @@ * of the moon, and get kind of confused in the process), and we try to * pick globally-unique content names. */ - GabblePresence *presence = gabble_presence_cache_get ( - priv->conn->presence_cache, sess->peer); - - if (creator == NULL && presence != NULL && - priv->peer_resource != NULL && - gabble_presence_resource_has_caps (presence, priv->peer_resource, - gabble_capability_set_predicate_has, + if (creator == NULL && + gabble_jingle_session_peer_has_quirk (sess, QUIRK_OMITS_CONTENT_CREATORS)) { DEBUG ("working around missing 'creator' attribute"); @@ -2355,7 +2365,8 @@ gboolean gabble_jingle_session_can_modify_contents (GabbleJingleSession *sess) { - return !JINGLE_IS_GOOGLE_DIALECT (sess->priv->dialect); + return !JINGLE_IS_GOOGLE_DIALECT (sess->priv->dialect) && + !gabble_jingle_session_peer_has_quirk (sess, QUIRK_GOOGLE_WEBMAIL_CLIENT); } JingleDialect diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/src/jingle-session.h new/telepathy-gabble-0.13.2/src/jingle-session.h --- old/telepathy-gabble-0.13.0/src/jingle-session.h 2011-05-05 12:39:20.000000000 +0200 +++ new/telepathy-gabble-0.13.2/src/jingle-session.h 2011-06-24 19:36:27.000000000 +0200 @@ -107,6 +107,9 @@ JingleDialect gabble_jingle_session_get_dialect (GabbleJingleSession *sess); gboolean gabble_jingle_session_can_modify_contents (GabbleJingleSession *sess); +gboolean gabble_jingle_session_peer_has_quirk ( + GabbleJingleSession *self, + const gchar *quirk); typedef void (*JingleReplyHandler) (GObject *, gboolean success, LmMessage *reply); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/src/jingle-transport-iface.c new/telepathy-gabble-0.13.2/src/jingle-transport-iface.c --- old/telepathy-gabble-0.13.0/src/jingle-transport-iface.c 2011-05-05 12:39:20.000000000 +0200 +++ new/telepathy-gabble-0.13.2/src/jingle-transport-iface.c 2011-06-17 11:11:54.000000000 +0200 @@ -107,7 +107,7 @@ if (state != JINGLE_TRANSPORT_STATE_CONNECTED) return FALSE; - /* Only Raw UDP *needs* contents in order to accept. */ + /* Only Raw UDP *needs* candidates in order to accept. */ if (m != NULL) return m (self); else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/src/media-channel.c new/telepathy-gabble-0.13.2/src/media-channel.c --- old/telepathy-gabble-0.13.0/src/media-channel.c 2011-03-25 15:16:43.000000000 +0100 +++ new/telepathy-gabble-0.13.2/src/media-channel.c 2011-06-17 11:11:55.000000000 +0200 @@ -450,9 +450,7 @@ /* If this is a Google session, let's set ImmutableStreams */ if (priv->session != NULL) { - JingleDialect d = gabble_jingle_session_get_dialect (priv->session); - - priv->immutable_streams = JINGLE_IS_GOOGLE_DIALECT (d); + priv->immutable_streams = !gabble_jingle_session_can_modify_contents (priv->session); } /* If there's no session yet, but we know who the peer will be, and we have * presence for them, we can set ImmutableStreams using the same algorithm as diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/src/presence-cache.c new/telepathy-gabble-0.13.2/src/presence-cache.c --- old/telepathy-gabble-0.13.0/src/presence-cache.c 2011-06-02 18:07:07.000000000 +0200 +++ new/telepathy-gabble-0.13.2/src/presence-cache.c 2011-06-24 20:53:16.000000000 +0200 @@ -40,6 +40,7 @@ #include <wocky/wocky-caps-cache.h> #include <wocky/wocky-caps-hash.h> #include <wocky/wocky-disco-identity.h> +#include <wocky/wocky-utils.h> #define DEBUG_FLAG GABBLE_DEBUG_PRESENCE @@ -1008,6 +1009,7 @@ DEBUG ("Client is Google Web Client"); gabble_capability_set_add (cap_set, QUIRK_GOOGLE_WEBMAIL_CLIENT); + gabble_capability_set_add (cap_set, QUIRK_OMITS_CONTENT_CREATORS); gabble_presence_set_capabilities (presence, resource, cap_set, serial); gabble_capability_set_free (cap_set); } @@ -1918,7 +1920,8 @@ if (NULL == presence) return; - if (presence->status == GABBLE_PRESENCE_OFFLINE && + if ((presence->status == GABBLE_PRESENCE_OFFLINE || + presence->status == GABBLE_PRESENCE_UNKNOWN) && presence->status_message == NULL && !presence->keep_unavailable) { @@ -1956,20 +1959,28 @@ gboolean *update_client_types) { GabblePresenceCachePrivate *priv = cache->priv; - TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); - const gchar *jid; GabblePresence *presence; GabbleCapabilitySet *old_cap_set; const GabbleCapabilitySet *new_cap_set; gboolean ret = FALSE; - jid = tp_handle_inspect (contact_repo, handle); - DEBUG ("%s (%d) resource %s prio %d presence %d message "%s"", - jid, handle, - resource == NULL ? "<null>" : resource, - priority, presence_id, - status_message == NULL ? "<null>" : status_message); + if (DEBUGGING) + { + TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( + (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + const gchar *jid = tp_handle_inspect (contact_repo, handle); + const gchar *presence_name = wocky_enum_to_nick ( + GABBLE_TYPE_PRESENCE_ID, presence_id); + + if (presence_name == NULL) + presence_name = "plugin-specific, not an element of GabblePresenceId"; + + DEBUG ("%s (%d) resource %s prio %d presence %d (%s) message "%s"", + jid, handle, + resource == NULL ? "<null>" : resource, + priority, presence_id, presence_name, + status_message == NULL ? "<null>" : status_message); + } presence = gabble_presence_cache_get (cache, handle); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/src/presence.c new/telepathy-gabble-0.13.2/src/presence.c --- old/telepathy-gabble-0.13.0/src/presence.c 2011-05-05 12:39:20.000000000 +0200 +++ new/telepathy-gabble-0.13.2/src/presence.c 2011-06-24 20:53:16.000000000 +0200 @@ -23,6 +23,7 @@ #include <string.h> #include <telepathy-glib/channel-manager.h> +#include <wocky/wocky-utils.h> #include "capabilities.h" #include "conn-presence.h" @@ -128,6 +129,8 @@ priv = self->priv; priv->cap_set = gabble_capability_set_new (); priv->resources = NULL; + + self->status = GABBLE_PRESENCE_UNKNOWN; } GabblePresence * @@ -636,13 +639,19 @@ GString *ret = g_string_new (""); gchar *tmp; GabblePresencePrivate *priv = presence->priv; + const gchar *presence_name = wocky_enum_to_nick (GABBLE_TYPE_PRESENCE_ID, + presence->status); + + if (presence_name == NULL) + presence_name = "plugin-specific, not an element of GabblePresenceId"; g_string_append_printf (ret, "nickname: %s\n" - "accumulated status: %d\n" + "accumulated status: %d (%s)\n" "accumulated status msg: %s\n" "kept while unavailable: %d\n", - presence->nickname, presence->status, + presence->nickname, + presence->status, presence_name, presence->status_message, presence->keep_unavailable); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/src/roster.c new/telepathy-gabble-0.13.2/src/roster.c --- old/telepathy-gabble-0.13.0/src/roster.c 2011-05-02 15:34:30.000000000 +0200 +++ new/telepathy-gabble-0.13.2/src/roster.c 2011-06-24 20:53:16.000000000 +0200 @@ -1381,7 +1381,9 @@ GabbleRosterItem *item = v; TpHandle contact = GPOINTER_TO_UINT (k); - if (item->subscribe == TP_SUBSCRIPTION_STATE_YES) + if (item->subscribe == TP_SUBSCRIPTION_STATE_YES && + gabble_presence_cache_get (roster->priv->conn->presence_cache, + contact) == NULL) g_array_append_val (members, contact); if (item->unsent_edits != NULL) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/tests/test-presence.c new/telepathy-gabble-0.13.2/tests/test-presence.c --- old/telepathy-gabble-0.13.0/tests/test-presence.c 2011-05-02 15:34:30.000000000 +0200 +++ new/telepathy-gabble-0.13.2/tests/test-presence.c 2011-06-24 20:53:16.000000000 +0200 @@ -21,7 +21,18 @@ GabbleCapabilitySet *cap_set; time_t now = time (NULL); + /* When we create a new presence, we know nothing about the contact in + * question's presence. + */ presence = gabble_presence_new (); + g_assert (GABBLE_PRESENCE_UNKNOWN == presence->status); + g_assert (NULL == presence->status_message); + + /* offline presence from no resource: we now know something about this + * contact's presence. + */ + g_assert (TRUE == gabble_presence_update (presence, NULL, + GABBLE_PRESENCE_OFFLINE, NULL, 0, NULL, now)); g_assert (GABBLE_PRESENCE_OFFLINE == presence->status); g_assert (NULL == presence->status_message); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/tests/twisted/Makefile.am new/telepathy-gabble-0.13.2/tests/twisted/Makefile.am --- old/telepathy-gabble-0.13.0/tests/twisted/Makefile.am 2011-06-02 18:07:07.000000000 +0200 +++ new/telepathy-gabble-0.13.2/tests/twisted/Makefile.am 2011-06-24 20:51:46.000000000 +0200 @@ -161,6 +161,7 @@ jingle/hold-av.py \ jingle/incoming-basics.py \ jingle/incoming-call-stream-error.py \ + jingle/incoming-gmail-modern-jingle.py \ jingle/initial-audio-video.py \ jingle/misuse.py \ jingle/stun-server.py \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/tests/twisted/gabbletest.py new/telepathy-gabble-0.13.2/tests/twisted/gabbletest.py --- old/telepathy-gabble-0.13.0/tests/twisted/gabbletest.py 2011-06-02 18:07:07.000000000 +0200 +++ new/telepathy-gabble-0.13.2/tests/twisted/gabbletest.py 2011-06-24 20:51:46.000000000 +0200 @@ -255,45 +255,44 @@ def sessionIq(self, iq): self.xmlstream.send(make_result_iq(self.xmlstream, iq)) -def make_stream_event(type, stanza, stream): - event = servicetest.Event(type, stanza=stanza) - event.stream = stream - event.to = stanza.getAttribute("to") - return event - -def make_iq_event(stream, iq): - event = make_stream_event('stream-iq', iq, stream) - event.iq_type = iq.getAttribute("type") - event.iq_id = iq.getAttribute("id") - query = iq.firstChildElement() - - if query: - event.query = query - event.query_ns = query.uri - event.query_name = query.name - - if query.getAttribute("node"): - event.query_node = query.getAttribute("node") - else: - event.query = None - - return event - -def make_presence_event(stream, stanza): - event = make_stream_event('stream-presence', stanza, stream) - event.presence_type = stanza.getAttribute('type') - - statuses = xpath.queryForNodes('/presence/status', stanza) - - if statuses: - event.presence_status = str(statuses[0]) - - return event - -def make_message_event(stream, stanza): - event = make_stream_event('stream-message', stanza, stream) - event.message_type = stanza.getAttribute('type') - return event +class StreamEvent(servicetest.Event): + def __init__(self, type_, stanza, stream): + servicetest.Event.__init__(self, type_, stanza=stanza) + self.stream = stream + self.to = stanza.getAttribute("to") + +class IQEvent(StreamEvent): + def __init__(self, stream, iq): + StreamEvent.__init__(self, 'stream-iq', iq, stream) + self.iq_type = iq.getAttribute("type") + self.iq_id = iq.getAttribute("id") + + query = iq.firstChildElement() + + if query: + self.query = query + self.query_ns = query.uri + self.query_name = query.name + + if query.getAttribute("node"): + self.query_node = query.getAttribute("node") + else: + self.query = None + +class PresenceEvent(StreamEvent): + def __init__(self, stream, stanza): + StreamEvent.__init__(self, 'stream-presence', stanza, stream) + self.presence_type = stanza.getAttribute('type') + + statuses = xpath.queryForNodes('/presence/status', stanza) + + if statuses: + self.presence_status = str(statuses[0]) + +class MessageEvent(StreamEvent): + def __init__(self, stream, stanza): + StreamEvent.__init__(self, 'stream-message', stanza, stream) + self.message_type = stanza.getAttribute('type') class StreamFactory(twisted.internet.protocol.Factory): def __init__(self, streams, jids): @@ -388,11 +387,11 @@ xmlstream.XmlStream.__init__(self, authenticator) self.event_func = event_func self.addObserver('//iq', lambda x: event_func( - make_iq_event(self, x))) + IQEvent(self, x))) self.addObserver('//message', lambda x: event_func( - make_message_event(self, x))) + MessageEvent(self, x))) self.addObserver('//presence', lambda x: event_func( - make_presence_event(self, x))) + PresenceEvent(self, x))) self.addObserver('//event/stream/authd', self._cb_authd) if self.handle_privacy_lists: self.addObserver("/iq/query[@xmlns='%s']" % ns.PRIVACY, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/tests/twisted/jingle/incoming-gmail-modern-jingle.py new/telepathy-gabble-0.13.2/tests/twisted/jingle/incoming-gmail-modern-jingle.py --- old/telepathy-gabble-0.13.0/tests/twisted/jingle/incoming-gmail-modern-jingle.py 1970-01-01 01:00:00.000000000 +0100 +++ new/telepathy-gabble-0.13.2/tests/twisted/jingle/incoming-gmail-modern-jingle.py 2011-06-17 11:11:55.000000000 +0200 @@ -0,0 +1,179 @@ +""" +Tests workarounds for calls with the GMail client, which supports a (currently +quirky) variation on the theme of modern Jingle. +""" + +from servicetest import EventPattern, wrap_channel, make_channel_proxy, assertEquals +from gabbletest import elem, elem_iq, exec_test +from jingletest2 import JingleTest2, JingleProtocol031 +import ns +import constants as cs +from twisted.words.xish import xpath + +class GMail(JingleTest2): + remote_caps = { + 'ext': 'pmuc-v1 sms-v1 camera-v1 video-v1 voice-v1', + 'ver': '1.1', + 'node': 'http://mail.google.com/xmpp/client/caps', + } + +def test(q, bus, conn, stream): + peer = 'foo@gmail.com/gmail.7E1F07D0' + self = 'test@localhost/test' + jp = JingleProtocol031() + jt = GMail(jp, conn, q, stream, 'test@localhost', peer) + jt.prepare(send_roster=False) + + sid = 'c1025763497' + si = elem_iq(stream, 'set', from_=peer, to=self)( + elem(ns.JINGLE, 'jingle', action='session-initiate', sid=sid, initiator=peer)( + elem('content', name='video')( + elem(ns.JINGLE_RTP, 'description', media='video')( + elem('payload-type', id='99', name='H264-SVC')( + elem('parameter', name='width', value='320'), + elem('parameter', name='height', value='200'), + elem('parameter', name='framerate', value='30'), + ), + # ... other codecs elided ... + elem('encryption'), + ), + elem(ns.GOOGLE_P2P, 'transport'), + ), + elem('content', name='audio')( + elem(ns.JINGLE_RTP, 'description', media='audio')( + elem('payload-type', id='103', name='ISAC', clockrate='16000')( + elem('parameter', name='bitrate', value='32000'), + ), + # ... other codecs elided ... + elem('encryption'), + ), + elem(ns.GOOGLE_P2P, 'transport'), + ) + ), + elem(ns.GOOGLE_SESSION, 'session', action='initiate', sid='c1025763497', initiator=peer)( + elem(ns.GOOGLE_SESSION_VIDEO, 'description')( + elem('payload-type', id='99', name='H264-SVC', width='320', height='200', framerate='30'), + # ... other codecs elided ... + elem(ns.JINGLE_RTP, 'encryption')( + elem(ns.GOOGLE_SESSION_VIDEO, 'usage'), + ), + elem(ns.GOOGLE_SESSION_PHONE, 'payload-type', id='103', name='ISAC', bitrate='32000', clockrate='16000'), + # ... other codecs elided ... + elem(ns.JINGLE_RTP, 'encryption')( + elem(ns.GOOGLE_SESSION_PHONE, 'usage'), + ), + ), + ), + ) + stream.send(si) + + nc, nsh = q.expect_many( + EventPattern('dbus-signal', signal='NewChannels'), + EventPattern('dbus-signal', signal='NewSessionHandler'), + ) + + path, properties = nc.args[0][0] + + # It's an audio+video call + assert properties[cs.INITIAL_AUDIO] + assert properties[cs.INITIAL_VIDEO] + # Google can't add and remove streams on the fly. We special-case GMail. + assert properties[cs.IMMUTABLE_STREAMS] + + chan = wrap_channel(bus.get_object(conn.bus_name, path), 'StreamedMedia') + session_handler = make_channel_proxy(conn, nsh.args[0], 'Media.SessionHandler') + session_handler.Ready() + + path, _, _, _ = q.expect('dbus-signal', signal='NewStreamHandler').args + stream1 = make_channel_proxy(conn, path, 'Media.StreamHandler') + path, _, _, _ = q.expect('dbus-signal', signal='NewStreamHandler').args + stream2 = make_channel_proxy(conn, path, 'Media.StreamHandler') + + stream1.Ready([]) + stream2.Ready([]) + + # Audio rtcp + stream.send( + elem_iq(stream, from_=peer, to=self, type='set')( + elem(ns.JINGLE, 'jingle', action='transport-info', sid=sid)( + elem('content', name='audio')( + elem(ns.GOOGLE_P2P, 'transport')( + elem('candidate', address='172.22.64.192', port='54335', + name='rtcp', username='+wJqkmRVYotCz+Rd', + password='POWPzg5Pks4+ywAz', preference='1', protocol='udp', + generation='0', network='1', type='local') + ) + ) + ) + ) + ) + q.expect('dbus-signal', signal='AddRemoteCandidate', path=stream1.object_path) + + # audio rtp + stream.send( + elem_iq(stream, from_=peer, to=self, type='set')( + elem(ns.JINGLE, 'jingle', action='transport-info', sid=sid)( + elem('content', name='audio')( + elem(ns.GOOGLE_P2P, 'transport')( + elem('candidate', address='172.22.64.192', port='54337', + name='rtp', username='F7rgdWcCgH3Q/HgE', + password='ioh2IDwd3iZEZHzM', preference='1', protocol='udp', + generation='0', network='1', type='local') + ) + ) + ) + ) + ) + q.expect('dbus-signal', signal='AddRemoteCandidate', path=stream1.object_path) + + # video rtcp: note the weird name='' field which Gabble has to work around + stream.send( + elem_iq(stream, from_=peer, to=self, type='set')( + elem(ns.JINGLE, 'jingle', action='transport-info', sid=sid)( + elem('content', name='video')( + elem(ns.GOOGLE_P2P, 'transport')( + elem('candidate', address='172.22.64.192', port='54339', + name='video_rtcp', username='fnLduEIu6VHsSOqh', + password='IYeNu/HWzMpx2zrS', preference='1', protocol='udp', + generation='0', network='1', type='local') + ) + ) + ) + ) + ) + q.expect('dbus-signal', signal='AddRemoteCandidate', path=stream2.object_path) + + # video rtp: ditto + stream.send( + elem_iq(stream, from_=peer, to=self, type='set')( + elem(ns.JINGLE, 'jingle', action='transport-info', sid=sid)( + elem('content', name='video')( + elem(ns.GOOGLE_P2P, 'transport')( + elem('candidate', address='172.22.64.192', port='54341', + name='video_rtp', username='mZVBFdQ2LyAP6oyE', + password='3uoyCHP8zwE+/Ylw', preference='1', protocol='udp', + generation='0', network='1', type='local') + ) + ) + ) + ) + ) + q.expect('dbus-signal', signal='AddRemoteCandidate', path=stream2.object_path) + + # Test that we're sending with name='video_rtp' as well, but only for the video stream. + stream1.NewNativeCandidate("fake", jt.get_remote_transports_dbus()) + e = q.expect('stream-iq', predicate=jp.action_predicate('transport-info')) + candidate = xpath.queryForNodes( + '/iq/jingle/content[@name="audio"]/transport/candidate', + e.stanza)[0] + assertEquals('rtp', candidate['name']) + + stream2.NewNativeCandidate("fake", jt.get_remote_transports_dbus()) + e = q.expect('stream-iq', predicate=jp.action_predicate('transport-info')) + candidate = xpath.queryForNodes( + '/iq/jingle/content[@name="video"]/transport/candidate', + e.stanza)[0] + assertEquals('video_rtp', candidate['name']) + +if __name__ == '__main__': + exec_test(test) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/tests/twisted/presence/initial-contact-presence.py new/telepathy-gabble-0.13.2/tests/twisted/presence/initial-contact-presence.py --- old/telepathy-gabble-0.13.0/tests/twisted/presence/initial-contact-presence.py 2011-03-25 15:16:43.000000000 +0100 +++ new/telepathy-gabble-0.13.2/tests/twisted/presence/initial-contact-presence.py 2011-06-24 20:53:16.000000000 +0200 @@ -1,16 +1,25 @@ """ Test that contacts we're subscribed to have their presence go from unknown to -offline when we get the roster. +offline when we get the roster, even if we've got (unavailable) presence for +them before we receive the roster; and that receiving available presence from a +contact before we get the roster also works. + +This serves as a regression test for +https://bugs.freedesktop.org/show_bug.cgi?id=38603, among other bugs. """ -from gabbletest import exec_test -from servicetest import assertEquals +from gabbletest import exec_test, make_presence, sync_stream +from servicetest import assertEquals, EventPattern, sync_dbus import constants as cs import ns from twisted.words.xish import domish +AVAILABLE = (cs.PRESENCE_AVAILABLE, u'available', u'') +OFFLINE = (cs.PRESENCE_OFFLINE, u'offline', u'') +UNKNOWN = (cs.PRESENCE_UNKNOWN, u'unknown', u'') + def make_roster_item(jid, subscription): item = domish.Element((None, 'item')) item['jid'] = jid @@ -20,26 +29,62 @@ def test(q, bus, conn, stream): event = q.expect('stream-iq', query_ns=ns.ROSTER) - amy, bob, che = conn.RequestHandles(cs.HT_CONTACT, - ['amy@foo.com', 'bob@foo.com', 'che@foo.com']) - assertEquals({amy: (cs.PRESENCE_UNKNOWN, u'unknown', u''), - bob: (cs.PRESENCE_UNKNOWN, u'unknown', u''), - che: (cs.PRESENCE_UNKNOWN, u'unknown', u'')}, - conn.SimplePresence.GetPresences([amy, bob, che])) + amy, bob, che, dre, eve = conn.RequestHandles(cs.HT_CONTACT, + ['amy@foo.com', 'bob@foo.com', 'che@foo.com', 'dre@foo.com', + 'eve@foo.com']) + assertEquals({amy: UNKNOWN, + bob: UNKNOWN, + che: UNKNOWN, + dre: UNKNOWN, + eve: UNKNOWN, + }, + conn.SimplePresence.GetPresences([amy, bob, che, dre, eve])) + + # Before the server sends Gabble the roster, it relays an 'unavailable' + # presence for one of the contacts we're subscribed to. This seems to + # happen in practice when using Prosody with a shared roster: the presence + # probes start coming back negatively before the shared roster is retrieved + # and returned to the client. + stream.send(make_presence('dre@foo.com', type='unavailable')) + + # Dre's presence is still unknown, since we don't have the roster. This + # isn't a change per se---we checked above, and Dre's presence was + # unknown---so it shouldn't be signalled. + q.forbid_events([EventPattern('dbus-signal', signal='PresencesChanged', + args=[{dre: UNKNOWN}])]) + + # We also receive an available presence from Eve before the roster arrives: + # this presence should behave normally. + stream.send(make_presence('eve@foo.com')) + q.expect('dbus-signal', signal='PresencesChanged', args=[{eve: AVAILABLE}]) event.stanza['type'] = 'result' event.query.addChild(make_roster_item('amy@foo.com', 'both')) event.query.addChild(make_roster_item('bob@foo.com', 'from')) event.query.addChild(make_roster_item('che@foo.com', 'to')) + event.query.addChild(make_roster_item('dre@foo.com', 'both')) + event.query.addChild(make_roster_item('eve@foo.com', 'both')) stream.send(event.stanza) - q.expect('dbus-signal', signal='PresencesChanged', - args=[{amy: (cs.PRESENCE_OFFLINE, u'offline', u''), - che: (cs.PRESENCE_OFFLINE, u'offline', u'')}]) - assertEquals({amy: (cs.PRESENCE_OFFLINE, u'offline', u''), - bob: (cs.PRESENCE_UNKNOWN, u'unknown', u''), - che: (cs.PRESENCE_OFFLINE, u'offline', u'')}, - conn.SimplePresence.GetPresences([amy, bob, che])) + # The presence for contacts on the roster whose subscription is 'to' or + # 'both' but for whom we haven't already received presence should change + # from 'unknown' (as checked above) to 'offline'. + e = q.expect('dbus-signal', signal='PresencesChanged') + changed_presences, = e.args + assertEquals( + {amy: OFFLINE, + che: OFFLINE, + dre: OFFLINE, + }, + changed_presences) + + assertEquals({amy: OFFLINE, + bob: UNKNOWN, + che: OFFLINE, + dre: OFFLINE, + eve: AVAILABLE, + }, + conn.SimplePresence.GetPresences([amy, bob, che, dre, eve])) if __name__ == '__main__': exec_test(test) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/tests/twisted/pubsub.py new/telepathy-gabble-0.13.2/tests/twisted/pubsub.py --- old/telepathy-gabble-0.13.0/tests/twisted/pubsub.py 2011-03-25 15:16:43.000000000 +0100 +++ new/telepathy-gabble-0.13.2/tests/twisted/pubsub.py 2011-06-21 15:24:00.000000000 +0200 @@ -4,6 +4,17 @@ import constants as cs import ns +def make_pubsub_event(from_, node, *contents): + return elem('message', from_=from_)( + elem((ns.PUBSUB_EVENT), 'event')( + elem('items', node=node)( + elem('item')( + *contents + ) + ) + ) + ) + def test(q, bus, conn, stream): # event node without NS message = elem('message', from_='bob@foo.com')( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/tests/twisted/roster/test-save-alias-to-roster.py new/telepathy-gabble-0.13.2/tests/twisted/roster/test-save-alias-to-roster.py --- old/telepathy-gabble-0.13.0/tests/twisted/roster/test-save-alias-to-roster.py 2011-03-25 15:16:43.000000000 +0100 +++ new/telepathy-gabble-0.13.2/tests/twisted/roster/test-save-alias-to-roster.py 2011-06-23 18:01:41.000000000 +0200 @@ -5,10 +5,28 @@ import dbus -from servicetest import EventPattern, call_async -from gabbletest import acknowledge_iq, exec_test, make_result_iq +from servicetest import EventPattern, call_async, assertEquals +from gabbletest import ( + acknowledge_iq, exec_test, make_result_iq, sync_stream, elem + ) import constants as cs import ns +from rostertest import expect_contact_list_signals, send_roster_push +from pubsub import make_pubsub_event + +def send_pep_nick_reply(stream, stanza, nickname): + result = make_result_iq(stream, stanza) + pubsub = result.firstChildElement() + items = pubsub.addElement('items') + items['node'] = ns.NICK + item = items.addElement('item') + item.addElement('nick', ns.NICK, content=nickname) + stream.send(result) + +def check_roster_write(event, jid, name): + item = event.query.firstChildElement() + assertEquals(jid, item['jid']) + assertEquals(name, item['name']) def test(q, bus, conn, stream): event, event2 = q.expect_many( @@ -19,17 +37,9 @@ acknowledge_iq(stream, event.stanza) acknowledge_iq(stream, event2.stanza) - while True: - event = q.expect('dbus-signal', signal='NewChannel') - path, type, handle_type, handle, suppress_handler = event.args - - if type != cs.CHANNEL_TYPE_CONTACT_LIST: - continue - - chan_name = conn.InspectHandles(handle_type, [handle])[0] - - if chan_name == 'subscribe': - break + signals = expect_contact_list_signals(q, bus, conn, lists=['subscribe']) + old_signal, new_signal = signals[0] + path = old_signal.args[0] # request subscription chan = bus.get_object(conn.bus_name, path) @@ -42,32 +52,74 @@ item = event.query.firstChildElement() acknowledge_iq(stream, event.stanza) - # FIXME: when we depend on a new enough tp-glib, expect AddMembers - # to return here + q.expect('dbus-return', method='AddMembers') call_async(q, conn.Aliasing, 'RequestAliases', [handle]) event = q.expect('stream-iq', iq_type='get', query_ns='http://jabber.org/protocol/pubsub', to='bob@foo.com') - - result = make_result_iq(stream, event.stanza) - pubsub = result.firstChildElement() - items = pubsub.addElement('items') - items['node'] = 'http://jabber.org/protocol/nick' - item = items.addElement('item') - item.addElement('nick', 'http://jabber.org/protocol/nick', - content='Bobby') - stream.send(result) + send_pep_nick_reply(stream, event.stanza, 'Bobby') event, _ = q.expect_many( EventPattern('stream-iq', iq_type='set', query_ns=ns.ROSTER), EventPattern('dbus-return', method='RequestAliases', value=(['Bobby'],))) + check_roster_write(event, 'bob@foo.com', 'Bobby') - item = event.query.firstChildElement() - assert item['jid'] == 'bob@foo.com' - assert item['name'] == 'Bobby' + # We get a roster push for a contact who for some reason has their alias + # set on our roster to the empty string (maybe a buggy client?). It's never + # useful for Gabble to say that someone's alias is the empty string (given + # the current semantics where the alias is always meant to be something you + # could show, even if it's just their JID), so let's forbid that. + jid = 'parts@labor.lit' + handle = conn.RequestHandles(cs.HT_CONTACT, [jid])[0] + q.forbid_events([EventPattern('dbus-signal', signal='AliasesChanged', + args=[[(handle, '')]])]) + + send_roster_push(stream, jid, 'both', name='') + # I don't really have very strong opinions on whether Gabble should be + # signalling that this contact's alias has *changed* per se, so am not + # explicitly expecting that. + q.expect('dbus-signal', signal='MembersChanged') + + # But if we ask for it, Gabble should probably send a PEP query. + assertEquals(jid, conn.Aliasing.GetAliases([handle])[handle]) + event = q.expect('stream-iq', iq_type='get', query_ns=ns.PUBSUB, to=jid) + nick = 'Constant Future' + + send_pep_nick_reply(stream, event.stanza, nick) + _, roster_write = q.expect_many( + EventPattern('dbus-signal', signal='AliasesChanged', + args=[[(handle, nick)]]), + EventPattern('stream-iq', iq_type='set', query_ns=ns.ROSTER), + ) + check_roster_write(roster_write, jid, nick) + + # Here's another contact, whose alias is set on our roster to their JID: + # because we've cached that they have no alias. Gabble shouldn't make + # unsolicited PEP or vCard queries to them. + jid = 'friendly@faith.plate' + handle = conn.RequestHandles(cs.HT_CONTACT, [jid])[0] + + q.forbid_events([ + EventPattern('stream-iq', query_ns=ns.PUBSUB, to=jid), + EventPattern('stream-iq', query_ns=ns.VCARD_TEMP, to=jid), + ]) + send_roster_push(stream, jid, 'both', name=jid) + q.expect('dbus-signal', signal='AliasesChanged', args=[[(handle, jid)]]) + sync_stream(q, stream) + + # But if we get a PEP nickname update for this contact, Gabble should use + # the new nickname, and write it back to the roster. + nick = u'The Friendly Faith Plate' + stream.send(make_pubsub_event(jid, ns.NICK, elem(ns.NICK, 'nick')(nick))) + _, roster_write = q.expect_many( + EventPattern('dbus-signal', signal='AliasesChanged', + args=[[(handle, nick)]]), + EventPattern('stream-iq', iq_type='set', query_ns=ns.ROSTER), + ) + check_roster_write(roster_write, jid, nick) if __name__ == '__main__': exec_test(test) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/tests/twisted/rostertest.py new/telepathy-gabble-0.13.2/tests/twisted/rostertest.py --- old/telepathy-gabble-0.13.0/tests/twisted/rostertest.py 2011-04-13 14:25:15.000000000 +0200 +++ new/telepathy-gabble-0.13.2/tests/twisted/rostertest.py 2011-06-21 15:24:00.000000000 +0200 @@ -7,7 +7,7 @@ import constants as cs import ns -def make_roster_push(stream, jid, subscription, ask_subscribe=False): +def make_roster_push(stream, jid, subscription, ask_subscribe=False, name=None): iq = IQ(stream, "set") iq['id'] = 'push' query = iq.addElement('query') @@ -16,14 +16,17 @@ item['jid'] = jid item['subscription'] = subscription + if name is not None: + item['name'] = name + if ask_subscribe: item['ask'] = 'subscribe' return iq -def send_roster_push(stream, jid, subscription, ask_subscribe=False): +def send_roster_push(stream, jid, subscription, ask_subscribe=False, name=None): iq = make_roster_push(stream, jid, subscription, - ask_subscribe=ask_subscribe) + ask_subscribe=ask_subscribe, name=name) stream.send(iq) def get_contact_list_event_patterns(q, bus, conn, expected_handle_type, name): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-gabble-0.13.0/tests/twisted/servicetest.py new/telepathy-gabble-0.13.2/tests/twisted/servicetest.py --- old/telepathy-gabble-0.13.0/tests/twisted/servicetest.py 2011-06-02 18:38:01.000000000 +0200 +++ new/telepathy-gabble-0.13.2/tests/twisted/servicetest.py 2011-06-21 15:24:00.000000000 +0200 @@ -40,16 +40,19 @@ except TypeError: # other is not iterable return False -class Event: +class Event(object): def __init__(self, type, **kw): self.__dict__.update(kw) self.type = type (self.subqueue, self.subtype) = type.split ("-", 1) + def __str__(self): + return '\n'.join([ str(type(self)) ] + format_event(self)) + def format_event(event): ret = ['- type %s' % event.type] - for key in dir(event): + for key in sorted(dir(event)): if key != 'type' and not key.startswith('_'): ret.append('- %s: %s' % ( key, pprint.pformat(getattr(event, key)))) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org