diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-09-11 12:02:09 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-09-11 12:02:09 +0100 |
commit | 4c720bc262ea35b802606910b63b57f28929bdc6 (patch) | |
tree | 3b1f466abaa19717f66f71193f0edc804e59abf6 | |
parent | 36b4819e116fbbcca22c7c87d72d31353b6802bb (diff) | |
parent | 5c2184c21b1e8878394834a3b1ef9096a3c51087 (diff) | |
download | telepathy-gabble-4c720bc262ea35b802606910b63b57f28929bdc6.tar.gz |
Merge branch 'telepathy-gabble-0.16'
Conflicts:
NEWS
configure.ac
src/conn-addressing.c
src/jingle-info.c
src/media-channel-hold.c
src/message-util.c
src/muc-tube-dbus.c
src/muc-tube-stream.c
src/olpc-activity.c
src/presence-cache.c
src/protocol.c
src/room-config.c
35 files changed, 87 insertions, 25 deletions
@@ -11,6 +11,14 @@ Enhancements: • Tube and Text channels are no longer announced together. (Jonny) +Fixes: + +• Make sure capability discovery works for the camera-v1 capability bundle, + avoiding an iChat bug in which it repeats failed capability discovery + requests in a rapid loop (fd.o #54634, Simon) + +• Fix some race conditions and other brokenness in the tests (Sjoerd) + telepathy-gabble 0.17.0 (2012-08-14) ==================================== diff --git a/configure.ac b/configure.ac index 914116286..4340fd2fb 100644 --- a/configure.ac +++ b/configure.ac @@ -148,10 +148,6 @@ if test -n "$with_ca_certificates"; then fi fi -# We are still using GValueArray which has been deprecated in GLib. Disable -# GLib deprecation warnings as the only way to fix this is to switch to GDBus. -AC_DEFINE(GLIB_DISABLE_DEPRECATION_WARNINGS, 1, [Build with GLib deprecated]) - AC_ARG_ENABLE(debug, AC_HELP_STRING([--disable-debug],[compile without debug code]), enable_debug=$enableval, enable_debug=yes ) @@ -228,8 +224,11 @@ AM_CONDITIONAL([ENABLE_GTK_DOC], [test "x$enable_gtk_doc" = xyes]) dnl Check for Glib PKG_CHECK_MODULES(GLIB, - [glib-2.0 >= 2.24, gobject-2.0 >= 2.24, gthread-2.0 >= 2.24, gio-2.0]) -PKG_CHECK_MODULES(GMODULE, [gmodule-2.0 >= 2.24]) + [glib-2.0 >= 2.30, gobject-2.0 >= 2.30, gthread-2.0 >= 2.30, gio-2.0]) +PKG_CHECK_MODULES(GMODULE, [gmodule-2.0 >= 2.30]) + +AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_30, [Ignore post 2.30 deprecations]) +AC_DEFINE(GLIB_VERSION_MAX_ALLOWED, GLIB_VERSION_2_30, [Prevent post 2.30 APIs]) AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) diff --git a/extensions/extensions.c b/extensions/extensions.c index c81d12627..d5b41e574 100644 --- a/extensions/extensions.c +++ b/extensions/extensions.c @@ -1,3 +1,4 @@ +#include "config.h" #include "extensions.h" /* auto-generated stubs */ diff --git a/gabble/capabilities.h b/gabble/capabilities.h index 81c8c2546..dd0a0c901 100644 --- a/gabble/capabilities.h +++ b/gabble/capabilities.h @@ -65,6 +65,7 @@ const GabbleCapabilitySet *gabble_capabilities_get_olpc_notify (void); const GabbleCapabilitySet *gabble_capabilities_get_bundle_share_v1 (void); const GabbleCapabilitySet *gabble_capabilities_get_bundle_voice_v1 (void); const GabbleCapabilitySet *gabble_capabilities_get_bundle_video_v1 (void); +const GabbleCapabilitySet *gabble_capabilities_get_bundle_camera_v1 (void); /* Return the capabilities we always have */ const GabbleCapabilitySet *gabble_capabilities_get_fixed_caps (void); diff --git a/lib/gibber/gibber-debug.c b/lib/gibber/gibber-debug.c index 96336e0e5..29b74f44e 100644 --- a/lib/gibber/gibber-debug.c +++ b/lib/gibber/gibber-debug.c @@ -1,3 +1,4 @@ +#include "config.h" #include <stdarg.h> diff --git a/lib/gibber/gibber-transport.c b/lib/gibber/gibber-transport.c index 82ad73b33..125472448 100644 --- a/lib/gibber/gibber-transport.c +++ b/lib/gibber/gibber-transport.c @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" #include <stdio.h> #include <stdlib.h> diff --git a/lib/gibber/gibber-unix-transport.c b/lib/gibber/gibber-unix-transport.c index 884bac6d1..7e2598dac 100644 --- a/lib/gibber/gibber-unix-transport.c +++ b/lib/gibber/gibber-unix-transport.c @@ -19,8 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -/* needed for struct ucred */ -#define _GNU_SOURCE +#include "config.h" #include <glib.h> diff --git a/plugins/gateways.c b/plugins/gateways.c index 8f121128d..eae683518 100644 --- a/plugins/gateways.c +++ b/plugins/gateways.c @@ -17,10 +17,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "gateways.h" - #include "config.h" +#include "gateways.h" + #include <string.h> #include <telepathy-glib/telepathy-glib.h> diff --git a/src/Makefile.am b/src/Makefile.am index 1bed0f378..158a0bcc0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -311,6 +311,7 @@ gabble-enumtypes.h: $(enumtype_sources) Makefile.in gabble-enumtypes.c: $(enumtype_sources) Makefile.in $(AM_V_GEN)glib-mkenums \ + --fhead "#include \"config.h\"\n" \ --fhead "#include <$*.h>" \ --fprod "\n/* enumerations from \"@filename@\" */\n#include \"@filename@\"" \ --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \ diff --git a/src/call-member.c b/src/call-member.c index 9435e4f70..9c7b0d350 100644 --- a/src/call-member.c +++ b/src/call-member.c @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" #include <stdio.h> #include <stdlib.h> diff --git a/src/capabilities.c b/src/capabilities.c index ce11067fe..9d8a97f69 100644 --- a/src/capabilities.c +++ b/src/capabilities.c @@ -74,6 +74,7 @@ static const Feature self_advertised_features[] = { FEATURE_OPTIONAL, NS_GOOGLE_FEAT_SHARE }, { FEATURE_OPTIONAL, NS_GOOGLE_FEAT_VOICE }, { FEATURE_OPTIONAL, NS_GOOGLE_FEAT_VIDEO }, + { FEATURE_OPTIONAL, NS_GOOGLE_FEAT_CAMERA }, { FEATURE_OPTIONAL, NS_JINGLE_DESCRIPTION_AUDIO }, { FEATURE_OPTIONAL, NS_JINGLE_DESCRIPTION_VIDEO }, { FEATURE_OPTIONAL, NS_JINGLE_RTP }, @@ -100,6 +101,7 @@ static GabbleCapabilitySet *legacy_caps = NULL; static GabbleCapabilitySet *share_v1_caps = NULL; static GabbleCapabilitySet *voice_v1_caps = NULL; static GabbleCapabilitySet *video_v1_caps = NULL; +static GabbleCapabilitySet *camera_v1_caps = NULL; static GabbleCapabilitySet *any_audio_caps = NULL; static GabbleCapabilitySet *any_video_caps = NULL; static GabbleCapabilitySet *any_audio_video_caps = NULL; @@ -135,6 +137,12 @@ gabble_capabilities_get_bundle_video_v1 (void) } const GabbleCapabilitySet * +gabble_capabilities_get_bundle_camera_v1 (void) +{ + return camera_v1_caps; +} + +const GabbleCapabilitySet * gabble_capabilities_get_any_audio (void) { return any_audio_caps; @@ -268,6 +276,9 @@ gabble_capabilities_init (gpointer conn) video_v1_caps = gabble_capability_set_new (); gabble_capability_set_add (video_v1_caps, NS_GOOGLE_FEAT_VIDEO); + camera_v1_caps = gabble_capability_set_new (); + gabble_capability_set_add (camera_v1_caps, NS_GOOGLE_FEAT_CAMERA); + any_audio_caps = gabble_capability_set_new (); gabble_capability_set_add (any_audio_caps, NS_JINGLE_RTP_AUDIO); gabble_capability_set_add (any_audio_caps, NS_JINGLE_DESCRIPTION_AUDIO); @@ -332,6 +343,7 @@ gabble_capabilities_finalize (gpointer conn) gabble_capability_set_free (share_v1_caps); gabble_capability_set_free (voice_v1_caps); gabble_capability_set_free (video_v1_caps); + gabble_capability_set_free (camera_v1_caps); gabble_capability_set_free (any_audio_caps); gabble_capability_set_free (any_video_caps); gabble_capability_set_free (any_audio_video_caps); @@ -347,6 +359,7 @@ gabble_capabilities_finalize (gpointer conn) share_v1_caps = NULL; voice_v1_caps = NULL; video_v1_caps = NULL; + camera_v1_caps = NULL; any_audio_caps = NULL; any_video_caps = NULL; any_audio_video_caps = NULL; diff --git a/src/conn-addressing.c b/src/conn-addressing.c index 6e4605073..7fff35455 100644 --- a/src/conn-addressing.c +++ b/src/conn-addressing.c @@ -17,6 +17,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" + #include "conn-addressing.h" #include <dbus/dbus-glib-lowlevel.h> diff --git a/src/conn-power-saving.c b/src/conn-power-saving.c index 07b6a896b..de6cc54d2 100644 --- a/src/conn-power-saving.c +++ b/src/conn-power-saving.c @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" #include "conn-power-saving.h" #define DEBUG_FLAG GABBLE_DEBUG_CONNECTION diff --git a/src/conn-sidecars.c b/src/conn-sidecars.c index a196e807c..496a2dfa8 100644 --- a/src/conn-sidecars.c +++ b/src/conn-sidecars.c @@ -18,6 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" + #include "conn-sidecars.h" #include <telepathy-glib/telepathy-glib.h> diff --git a/src/conn-util.c b/src/conn-util.c index 98be2448e..00f2e4d15 100644 --- a/src/conn-util.c +++ b/src/conn-util.c @@ -17,6 +17,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" #include "conn-util.h" #include <gabble/gabble.h> diff --git a/src/connection.c b/src/connection.c index 330a7b0f8..e6c8a866b 100644 --- a/src/connection.c +++ b/src/connection.c @@ -2397,10 +2397,11 @@ gabble_connection_fill_in_caps (GabbleConnection *self, if (voice_v1) g_string_append (ext, " " BUNDLE_VOICE_V1); - if (video_v1) { + if (video_v1) g_string_append (ext, " " BUNDLE_VIDEO_V1); + + if (gabble_presence_has_cap (presence, NS_GOOGLE_FEAT_CAMERA)) g_string_append (ext, " " BUNDLE_CAMERA_V1); - } wocky_node_set_attribute (node, "ext", ext->str); g_string_free (ext, TRUE); @@ -2701,6 +2702,9 @@ iq_disco_cb (WockyPorter *porter, if (!tp_strdiff (suffix, BUNDLE_VIDEO_V1)) features = gabble_capabilities_get_bundle_video_v1 (); + + if (!tp_strdiff (suffix, BUNDLE_CAMERA_V1)) + features = gabble_capabilities_get_bundle_camera_v1 (); } if (data_forms != NULL) diff --git a/src/gtalk-file-collection.c b/src/gtalk-file-collection.c index 9490ca542..e13180fe0 100644 --- a/src/gtalk-file-collection.c +++ b/src/gtalk-file-collection.c @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - +#include "config.h" #include "gtalk-file-collection.h" #include <stdio.h> diff --git a/src/jingle-content.c b/src/jingle-content.c index ec98e0b19..4989a3280 100644 --- a/src/jingle-content.c +++ b/src/jingle-content.c @@ -17,6 +17,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" #include "jingle-content.h" #include <stdio.h> diff --git a/src/jingle-media-rtp.c b/src/jingle-media-rtp.c index e343ef25e..45a14191a 100644 --- a/src/jingle-media-rtp.c +++ b/src/jingle-media-rtp.c @@ -22,6 +22,7 @@ * supports standard Jingle drafts (v0.15, v0.26) and Google's jingle variants * (libjingle 0.3/0.4). */ +#include "config.h" #include "jingle-media-rtp.h" #include <stdio.h> diff --git a/src/jingle-mint.c b/src/jingle-mint.c index 9ea90129c..f575cfd39 100644 --- a/src/jingle-mint.c +++ b/src/jingle-mint.c @@ -24,6 +24,7 @@ * "foundry" to make JingleFactory and this class have different initials. */ +#include "config.h" #include "jingle-mint.h" #define DEBUG_FLAG GABBLE_DEBUG_MEDIA diff --git a/src/jingle-session.c b/src/jingle-session.c index 0d2e016cc..0e266b92d 100644 --- a/src/jingle-session.c +++ b/src/jingle-session.c @@ -17,6 +17,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" #include "jingle-session.h" #include <stdio.h> diff --git a/src/jingle-share.c b/src/jingle-share.c index fe163c37d..838888c2d 100644 --- a/src/jingle-share.c +++ b/src/jingle-share.c @@ -21,6 +21,7 @@ /* Share content type deals with file sharing content, ie. file transfers. It * Google's jingle variants (libjingle 0.3/0.4). */ +#include "config.h" #include "jingle-share.h" #include <stdio.h> diff --git a/src/jingle-tp-util.c b/src/jingle-tp-util.c index 19f3151d7..d6378f45c 100644 --- a/src/jingle-tp-util.c +++ b/src/jingle-tp-util.c @@ -17,6 +17,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" + #include "jingle-tp-util.h" JingleMediaType diff --git a/src/jingle-transport-google.c b/src/jingle-transport-google.c index 2c86cc5fd..491036d48 100644 --- a/src/jingle-transport-google.c +++ b/src/jingle-transport-google.c @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" #include "jingle-transport-google.h" #include <stdio.h> diff --git a/src/jingle-transport-iceudp.c b/src/jingle-transport-iceudp.c index 5defb2114..cd7f3a1e3 100644 --- a/src/jingle-transport-iceudp.c +++ b/src/jingle-transport-iceudp.c @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" #include "jingle-transport-iceudp.h" #include <stdio.h> diff --git a/src/jingle-transport-iface.c b/src/jingle-transport-iface.c index 5e4e50eb0..7a1ca9bf3 100644 --- a/src/jingle-transport-iface.c +++ b/src/jingle-transport-iface.c @@ -17,6 +17,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" #include "jingle-transport-iface.h" #include <glib.h> diff --git a/src/jingle-transport-rawudp.c b/src/jingle-transport-rawudp.c index 37a5d1b61..17b1b1f8f 100644 --- a/src/jingle-transport-rawudp.c +++ b/src/jingle-transport-rawudp.c @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" #include "jingle-transport-rawudp.h" #include <stdio.h> diff --git a/src/media-factory.c b/src/media-factory.c index 7710584cb..675505e80 100644 --- a/src/media-factory.c +++ b/src/media-factory.c @@ -1053,7 +1053,10 @@ gabble_media_factory_add_caps (GabbleCapabilitySet *caps, /* video-v1 implies that we interop with Google Video Chat, i.e. we have * gtalk-p2p and H.264 as well as video */ if (gtalk_p2p && h264) - gabble_capability_set_add (caps, NS_GOOGLE_FEAT_VIDEO); + { + gabble_capability_set_add (caps, NS_GOOGLE_FEAT_VIDEO); + gabble_capability_set_add (caps, NS_GOOGLE_FEAT_CAMERA); + } } } diff --git a/src/namespaces.h b/src/namespaces.h index 0103aa4f0..0d06d7d54 100644 --- a/src/namespaces.h +++ b/src/namespaces.h @@ -35,6 +35,7 @@ #define NS_GOOGLE_FEAT_SHARE "http://google.com/xmpp/protocol/share/v1" #define NS_GOOGLE_FEAT_VOICE "http://www.google.com/xmpp/protocol/voice/v1" #define NS_GOOGLE_FEAT_VIDEO "http://www.google.com/xmpp/protocol/video/v1" +#define NS_GOOGLE_FEAT_CAMERA "http://www.google.com/xmpp/protocol/camera/v1" #define NS_GOOGLE_JINGLE_INFO "google:jingleinfo" #define NS_GOOGLE_ROSTER "google:roster" #define NS_GOOGLE_QUEUE "google:queue" diff --git a/src/presence-cache.c b/src/presence-cache.c index 23d1e8ade..26118a48b 100644 --- a/src/presence-cache.c +++ b/src/presence-cache.c @@ -507,6 +507,8 @@ gabble_presence_cache_add_bundles (GabblePresenceCache *cache) NS_GABBLE_CAPS "#" BUNDLE_VIDEO_V1, NS_GOOGLE_FEAT_VIDEO); gabble_presence_cache_add_bundle_caps (cache, NS_GABBLE_CAPS "#" BUNDLE_SHARE_V1, NS_GOOGLE_FEAT_SHARE); + gabble_presence_cache_add_bundle_caps (cache, + NS_GABBLE_CAPS "#" BUNDLE_CAMERA_V1, NS_GOOGLE_FEAT_CAMERA); } static GObject * diff --git a/src/sidecar.c b/src/sidecar.c index 295e61f1d..69ede729b 100644 --- a/src/sidecar.c +++ b/src/sidecar.c @@ -18,6 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" + #include "gabble/sidecar.h" GType diff --git a/tests/test-gabble-idle-weak.c b/tests/test-gabble-idle-weak.c index 33422277d..37f81d575 100644 --- a/tests/test-gabble-idle-weak.c +++ b/tests/test-gabble-idle-weak.c @@ -1,3 +1,4 @@ +#include "config.h" #include <glib.h> diff --git a/tests/twisted/caps/trust-thyself.py b/tests/twisted/caps/trust-thyself.py index 310fb4f82..34a145b62 100644 --- a/tests/twisted/caps/trust-thyself.py +++ b/tests/twisted/caps/trust-thyself.py @@ -60,18 +60,21 @@ def test(q, bus, conn, stream): c_ = xpath.queryForNodes('/presence/c', self_presence.stanza)[0] assertNotEquals(c['ver'], c_['ver']) - # But then someone asks us for our old caps - iq = IQ(stream, 'get') - iq['from'] = jid - query = iq.addElement((ns.DISCO_INFO, 'query')) - query['node'] = c['node'] + '#' + c['ver'] - stream.send(iq) + for suffix in [c['ver'], 'voice-v1', 'video-v1', 'camera-v1', 'share-v1', + 'pmuc-v1'] + list(c_['ext'].split()): + # But then someone asks us for our old caps + iq = IQ(stream, 'get') + iq['from'] = jid + query = iq.addElement((ns.DISCO_INFO, 'query')) + query['node'] = c['node'] + '#' + suffix + stream.send(iq) - # Gabble should still know what they are, and reply. This is actually quite - # important: there's a bug in iChat where if you return an error to a disco - # query, it just asks again, and again, and again... - reply = q.expect('stream-iq', to=jid) - assertEquals('result', reply.iq_type) + # Gabble should still know what they are, and reply. This is + # actually quite important: there's a bug in iChat where if you + # return an error to a disco query, it just asks again, and again, + # and again... + reply = q.expect('stream-iq', to=jid) + assertEquals('result', reply.iq_type) if __name__ == '__main__': exec_test(test) diff --git a/tests/twisted/main-debug.c b/tests/twisted/main-debug.c index 89166670e..2e860c17f 100644 --- a/tests/twisted/main-debug.c +++ b/tests/twisted/main-debug.c @@ -17,6 +17,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" + #include <stdlib.h> #include "gabble.h" diff --git a/tests/twisted/test-resolver.c b/tests/twisted/test-resolver.c index 4e2274119..6d29252e2 100644 --- a/tests/twisted/test-resolver.c +++ b/tests/twisted/test-resolver.c @@ -30,6 +30,8 @@ * test_resolver_add_A (TEST_RESOLVER (kludged), "localhost", "127.0.1.1"); */ +#include "config.h" + #include <stdio.h> #include <glib.h> |