[asterisk-scf-commits] asterisk-scf/integration/bridging.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu Oct 21 15:13:57 CDT 2010


branch "master" has been updated
       via  c2d438b4c5b08fabbca76b23d0594b757e71fbd8 (commit)
      from  ab8e28f083d65ba2a52e4bc1bdc6ad202aa5759d (commit)

Summary of changes:
 src/BridgeImpl.cpp |    2 +-
 src/BridgeImpl.h   |   14 ++++++++++++++
 2 files changed, 15 insertions(+), 1 deletions(-)


- Log -----------------------------------------------------------------
commit c2d438b4c5b08fabbca76b23d0594b757e71fbd8
Author: Brent Eagles <beagles at digium.com>
Date:   Thu Oct 21 17:42:12 2010 -0230

    Modify bridge session to quell ring notifications to sessions that are already
    connected.

diff --git a/src/BridgeImpl.cpp b/src/BridgeImpl.cpp
index 6861b26..6676e63 100644
--- a/src/BridgeImpl.cpp
+++ b/src/BridgeImpl.cpp
@@ -155,7 +155,7 @@ namespace BridgeService
             {
                 try
                 {
-                    b->getSession()->ring();
+                    b->ring();
                 }
                 catch(const Ice::ObjectNotExistException& ex)
                 {
diff --git a/src/BridgeImpl.h b/src/BridgeImpl.h
index 2fe8464..ab7f5c5 100644
--- a/src/BridgeImpl.h
+++ b/src/BridgeImpl.h
@@ -42,6 +42,9 @@ namespace BridgeService
 
             void connect()
             {
+                //
+                // Only call connect on a session if its not already connected.
+                //
                 IceUtil::Mutex::Lock lock(mMutex);
                 if(mConnected)
                     return;
@@ -50,6 +53,17 @@ namespace BridgeService
                 mConnected = true;
             }
 
+            void ring()
+            {
+                //
+                // Don't relay ring notifications to connected sessions.
+                //
+                IceUtil::Mutex::Lock lock(mMutex);
+                if(mConnected)
+                    return;
+                mSession->ring();
+            }
+
             void setConnected()
             {
                 IceUtil::Mutex::Lock lock(mMutex);

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/bridging.git



More information about the asterisk-scf-commits mailing list