[telepathy-gabble/master] Correctly empty remote codec list on update

Will Thompson will.thompson at collabora.co.uk
Thu Apr 30 11:21:27 PDT 2009


Previously it was just freed, rather than being replaced by the empty
list.
---
 src/media-stream.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/media-stream.c b/src/media-stream.c
index ad82a39..adeb921 100644
--- a/src/media-stream.c
+++ b/src/media-stream.c
@@ -1350,7 +1350,12 @@ new_remote_codecs_cb (GabbleJingleContent *content,
   if (codecs->len != 0)
     {
       priv->updating_remote_codecs = TRUE;
+
+      /* Free the old codec list, and make a new, empty one to fill in. */
       g_value_reset (&priv->remote_codecs);
+      codecs = dbus_g_type_specialized_construct (
+          TP_ARRAY_TYPE_MEDIA_STREAM_HANDLER_CODEC_LIST);
+      g_value_take_boxed (&priv->remote_codecs, codecs);
     }
 
   for (li = clist; li; li = li->next)
-- 
1.5.6.5




More information about the telepathy-commits mailing list