diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2012-09-03 11:14:34 +0200 |
---|---|---|
committer | Sjoerd Simons <sjoerd@luon.net> | 2012-09-03 14:09:58 +0200 |
commit | 4c886ee65c1e74ceb866f9d8b94d05cd1b0ab254 (patch) | |
tree | c99a54bbfc09ba3e6b08d438a4b0a31bc0a17665 | |
parent | f55630f7da156b0773e999ac70916d340f7b23e0 (diff) | |
download | telepathy-glib-4c886ee65c1e74ceb866f9d8b94d05cd1b0ab254.tar.gz |
Fix retrieving the remove contact from a MediaDescription hash
Correctly get the remote contact handle out of the MediaDescription
hash, it's an a{sv} not string => uint32.
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54425
Conflicts:
telepathy-glib/base-media-call-content.c
-rw-r--r-- | telepathy-glib/base-media-call-content.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/telepathy-glib/base-media-call-content.c b/telepathy-glib/base-media-call-content.c index cf5552305..eb15db752 100644 --- a/telepathy-glib/base-media-call-content.c +++ b/telepathy-glib/base-media-call-content.c @@ -681,11 +681,13 @@ tp_base_media_call_content_update_local_media_description ( TpBaseMediaCallContent *self = TP_BASE_MEDIA_CALL_CONTENT (iface); GHashTable *current_properties; GPtrArray *codecs; - gpointer contact; + TpHandle contact; + gboolean valid; + + contact = tp_asv_get_uint32 (properties, + TP_PROP_CALL_CONTENT_MEDIA_DESCRIPTION_REMOTE_CONTACT, &valid); - if (!g_hash_table_lookup_extended (properties, - TP_PROP_CALL_CONTENT_MEDIA_DESCRIPTION_REMOTE_CONTACT, - NULL, &contact)) + if (!valid) { GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, "The media description is missing the RemoteContact key." }; @@ -695,7 +697,7 @@ tp_base_media_call_content_update_local_media_description ( current_properties = g_hash_table_lookup ( self->priv->local_media_descriptions, - contact); + GUINT_TO_POINTER (contact)); if (current_properties == NULL) { @@ -718,7 +720,7 @@ tp_base_media_call_content_update_local_media_description ( } if (self->priv->current_offer != NULL && - tp_call_content_media_description_get_remote_contact (self->priv->current_offer) == GPOINTER_TO_UINT (contact)) + tp_call_content_media_description_get_remote_contact (self->priv->current_offer) == contact) { GError error = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE, "Can not update the media description while there is" @@ -727,7 +729,7 @@ tp_base_media_call_content_update_local_media_description ( return; } - set_local_properties (self, GPOINTER_TO_UINT (contact), properties); + set_local_properties (self, contact, properties); tp_svc_call_content_interface_media_return_from_update_local_media_description (context); |