diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2011-06-25 00:24:10 +0200 |
---|---|---|
committer | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2011-06-25 00:24:16 +0200 |
commit | d1e2397dc684b609ac5f9b78fd4d5b1e2b24c452 (patch) | |
tree | 69d2ba78fcec9781497790fcc07f710e8dbbcfb3 /src/muc-channel.c | |
parent | 58a742936ea0a71da0df61043236c65ba485be8d (diff) | |
download | telepathy-salut-d1e2397dc684b609ac5f9b78fd4d5b1e2b24c452.tar.gz |
Cope with the default value of handle-type being changed in new tp-glib
In recent versions of tp-glib the handle-type property defaults to
TP_UNKNOWN_HANDLE_TYPE instead of 0. Update the various assertions which
verify a channel doesn't get constructed with an unexpected handle type
to accept both 0 and TP_UNKNOWN_HANDLE_TYPE so we're compatible with
both versions.
Diffstat (limited to 'src/muc-channel.c')
-rw-r--r-- | src/muc-channel.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/muc-channel.c b/src/muc-channel.c index b8b0fbb3..9be5bf7f 100644 --- a/src/muc-channel.c +++ b/src/muc-channel.c @@ -268,8 +268,11 @@ salut_muc_channel_set_property (GObject *object, priv->muc_connection = g_value_get_object (value); break; case PROP_HANDLE_TYPE: + /* 0 is the old tp-glib value of unset, TP_UNKNOWN_HANDLE_TYPE is the + * new version */ g_assert (g_value_get_uint (value) == 0 - || g_value_get_uint (value) == TP_HANDLE_TYPE_ROOM); + || g_value_get_uint (value) == TP_HANDLE_TYPE_ROOM + || g_value_get_uint (value) == TP_UNKNOWN_HANDLE_TYPE); break; case PROP_CHANNEL_TYPE: tmp = g_value_get_string (value); |