[empathy: 3/10] destroy the old candidates before updating them



commit 6f618087dea59d0a7c0d4ff0c63cd0dc38f76ac2
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Wed Aug 4 10:50:25 2010 +0200

    destroy the old candidates before updating them

 libempathy/empathy-call-handler.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/libempathy/empathy-call-handler.c b/libempathy/empathy-call-handler.c
index 2e1a119..feb6793 100644
--- a/libempathy/empathy-call-handler.c
+++ b/libempathy/empathy-call-handler.c
@@ -479,12 +479,14 @@ update_candidates (EmpathyCallHandler *self,
     {
       if (remote_candidate != NULL)
         {
+          fs_candidate_destroy (priv->audio_remote_candidate);
           priv->audio_remote_candidate = fs_candidate_copy (remote_candidate);
           g_object_notify (G_OBJECT (self), "audio-remote-candidate");
         }
 
       if (local_candidate != NULL)
         {
+          fs_candidate_destroy (priv->audio_local_candidate);
           priv->audio_local_candidate = fs_candidate_copy (local_candidate);
           g_object_notify (G_OBJECT (self), "audio-local-candidate");
         }
@@ -493,12 +495,14 @@ update_candidates (EmpathyCallHandler *self,
     {
       if (remote_candidate != NULL)
         {
+          fs_candidate_destroy (priv->video_remote_candidate);
           priv->video_remote_candidate = fs_candidate_copy (remote_candidate);
           g_object_notify (G_OBJECT (self), "video-remote-candidate");
         }
 
       if (local_candidate != NULL)
         {
+          fs_candidate_destroy (priv->video_local_candidate);
           priv->video_local_candidate = fs_candidate_copy (local_candidate);
           g_object_notify (G_OBJECT (self), "video-local-candidate");
         }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]