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 11:47:17 +0200 |
commit | a04137272f0468fc1f4904280a02633cea60c998 (patch) | |
tree | 811ada3836d750b2cd8b1760296c941633267fcc /telepathy-glib/base-media-call-content.c | |
parent | 680a5dd2a492078a0cc497502aab1d81cdba39ac (diff) | |
download | telepathy-glib-a04137272f0468fc1f4904280a02633cea60c998.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
Diffstat (limited to 'telepathy-glib/base-media-call-content.c')
-rw-r--r-- | telepathy-glib/base-media-call-content.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/telepathy-glib/base-media-call-content.c b/telepathy-glib/base-media-call-content.c index b7cf8e1d4..6256c064c 100644 --- a/telepathy-glib/base-media-call-content.c +++ b/telepathy-glib/base-media-call-content.c @@ -681,12 +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_ERROR, TP_ERROR_INVALID_ARGUMENT, "The media description is missing the RemoteContact key." }; @@ -696,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) { @@ -719,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_ERROR, TP_ERROR_NOT_AVAILABLE, "Can not update the media description while there is" @@ -728,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); |