[ekiga/ds-fix-boost-leaks] CallCore: Simplified signal propagation.



commit c45a8a51f6b6aa1d10c49b4273880da4aa31ad56
Author: Damien Sandras <dsandras seconix com>
Date:   Sun Oct 11 14:36:22 2015 +0200

    CallCore: Simplified signal propagation.

 lib/engine/protocol/call-core.cpp |   13 +++----------
 lib/engine/protocol/call-core.h   |    5 -----
 2 files changed, 3 insertions(+), 15 deletions(-)
---
diff --git a/lib/engine/protocol/call-core.cpp b/lib/engine/protocol/call-core.cpp
index 4a20388..6008b89 100644
--- a/lib/engine/protocol/call-core.cpp
+++ b/lib/engine/protocol/call-core.cpp
@@ -168,8 +168,8 @@ void CallCore::add_call (const boost::shared_ptr<Call> & call)
 
   if (id == Ekiga::FriendOrFoe::Foe) {
 
-    call->hang_up ();
-    return;
+//    call->hang_up ();
+//    return;
   }
 
   calls.add_object (call);
@@ -186,19 +186,12 @@ void CallCore::add_call (const boost::shared_ptr<Call> & call)
   calls.add_connection (call, call->stream_closed.connect (boost::bind (boost::ref (stream_closed), _1, _2, 
_3, _4)));
   calls.add_connection (call, call->stream_paused.connect (boost::bind (boost::ref (stream_paused), _1, _2, 
_3)));
   calls.add_connection (call, call->stream_resumed.connect (boost::bind (boost::ref (stream_resumed), _1, 
_2, _3)));
-  calls.add_connection (call, call->removed.connect (boost::bind (&CallCore::remove_call, this, _1)));
+  calls.object_removed.connect (boost::bind (boost::ref (removed_call), _1));
 
   created_call (call);
 }
 
 
-void CallCore::remove_call (const boost::shared_ptr<Call> & call)
-{
-  calls.remove_object (call);
-  removed_call (call);
-}
-
-
 void CallCore::on_missed_call (const boost::shared_ptr<Call> & call)
 {
   boost::shared_ptr<Ekiga::NotificationCore> _notification_core = notification_core.lock ();
diff --git a/lib/engine/protocol/call-core.h b/lib/engine/protocol/call-core.h
index 648be15..88f7f22 100644
--- a/lib/engine/protocol/call-core.h
+++ b/lib/engine/protocol/call-core.h
@@ -103,11 +103,6 @@ namespace Ekiga
        */
       void add_call (const boost::shared_ptr<Call> & call);
 
-      /** Remove a call handled by the CallCore serice.
-       * @param call is the call to be removed.
-       */
-      void remove_call (const boost::shared_ptr<Call> & call);
-
       /** Adds a CallManager to the CallCore service.
        * @param The manager to be added.
        */


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