[ekiga/gnome-2-26] Made sure we don't leak the Ekiga::CallCore



commit 6963b39f8a07ef5aa62fe5c9b2c0da1fe2e125c6
Author: Julien Puydt <jpuydt src gnome org>
Date:   Fri Mar 27 10:08:58 2009 +0000

    Made sure we don't leak the Ekiga::CallCore
    
    svn path=/trunk/; revision=7820
---
 lib/engine/components/opal/opal-call-manager.cpp |    8 +++++---
 lib/engine/components/opal/opal-call-manager.h   |    2 --
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/engine/components/opal/opal-call-manager.cpp b/lib/engine/components/opal/opal-call-manager.cpp
index 9296cf0..f609b4d 100644
--- a/lib/engine/components/opal/opal-call-manager.cpp
+++ b/lib/engine/components/opal/opal-call-manager.cpp
@@ -27,7 +27,7 @@
 
 
 /*
- *                         manager.cpp  -  description
+ *                         opal-call-manager.cpp  -  description
  *                         ---------------------------
  *   begin                : Sat Dec 23 2000
  *   copyright            : (C) 2000-2006 by Damien Sandras
@@ -140,8 +140,6 @@ CallManager::CallManager (Ekiga::ServiceCore & _core)
   SetMediaFormatOrder (PStringArray ());
   SetMediaFormatMask (PStringArray ());
 
-  call_core = core.get ("call-core");
-
   // used to communicate with the StunDetector
 #if GLIB_CHECK_VERSION(2,16,0)
   queue = g_async_queue_new_full (g_free);
@@ -633,6 +631,8 @@ void CallManager::get_video_options (CallManager::VideoOptions & options) const
 
 OpalCall *CallManager::CreateCall ()
 {
+  gmref_ptr<Ekiga::CallCore> call_core = core.get ("call-core"); // FIXME: threaded?
+
   gmref_ptr<Opal::Call> call (new Opal::Call (*this, core));
   call_core->add_call (call, gmref_ptr<CallManager>(this));
 
@@ -748,6 +748,8 @@ CallManager::HandleSTUNResult ()
 void
 CallManager::ReportSTUNError (const std::string error)
 {
+  gmref_ptr<Ekiga::CallCore> call_core = core.get ("call-core");
+
   // notice we're in for an infinite loop if nobody ever reports to the user!
   if ( !call_core->errors.handle_request (error)) {
 
diff --git a/lib/engine/components/opal/opal-call-manager.h b/lib/engine/components/opal/opal-call-manager.h
index 3c15cde..272db5c 100644
--- a/lib/engine/components/opal/opal-call-manager.h
+++ b/lib/engine/components/opal/opal-call-manager.h
@@ -54,7 +54,6 @@
 #include "runtime.h"
 #include "contact-core.h"
 #include "presence-core.h"
-#include "call-core.h"
 #include "call-manager.h"
 #include "call.h"
 
@@ -179,7 +178,6 @@ private:
 
     Ekiga::ServiceCore & core;
     Ekiga::CodecList codecs; 
-    gmref_ptr<Ekiga::CallCore> call_core; // FIXME: is it threaded in there?
 
     /* used to get the STUNDetector results */
     GAsyncQueue* queue;



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