summaryrefslogtreecommitdiff
path: root/src/file-transfer-channel.c
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2011-06-25 00:24:10 +0200
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2011-06-25 00:24:16 +0200
commitd1e2397dc684b609ac5f9b78fd4d5b1e2b24c452 (patch)
tree69d2ba78fcec9781497790fcc07f710e8dbbcfb3 /src/file-transfer-channel.c
parent58a742936ea0a71da0df61043236c65ba485be8d (diff)
downloadtelepathy-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/file-transfer-channel.c')
-rw-r--r--src/file-transfer-channel.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/file-transfer-channel.c b/src/file-transfer-channel.c
index 794631f6..4d93a465 100644
--- a/src/file-transfer-channel.c
+++ b/src/file-transfer-channel.c
@@ -354,8 +354,11 @@ salut_file_transfer_channel_set_property (GObject *object,
self->priv->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_CONTACT);
+ || g_value_get_uint (value) == TP_HANDLE_TYPE_CONTACT
+ || g_value_get_uint (value) == TP_UNKNOWN_HANDLE_TYPE);
break;
case PROP_CHANNEL_TYPE:
/* these properties are writable in the interface, but not actually