[asterisk-scf-commits] asterisk-scf/integration/bridging.git branch "transfer" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Wed Oct 13 14:31:11 CDT 2010
branch "transfer" has been updated
via c750446c331c3a1744ec4212ad306f707c796340 (commit)
from cbd33865aeb400d03cc349ac103b0093c7b72fd2 (commit)
Summary of changes:
src/BridgeImpl.cpp | 1 +
src/MediaSplicer.cpp | 19 +++++++++++++++++--
2 files changed, 18 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit c750446c331c3a1744ec4212ad306f707c796340
Author: Brent Eagles <beagles at digium.com>
Date: Wed Oct 13 17:00:29 2010 -0230
Added loads more debugging.
diff --git a/src/BridgeImpl.cpp b/src/BridgeImpl.cpp
index 42f76ea..5a52fe8 100644
--- a/src/BridgeImpl.cpp
+++ b/src/BridgeImpl.cpp
@@ -586,6 +586,7 @@ void AsteriskSCF::BridgeService::BridgeImpl::replaceSession(const AsteriskSCF::S
//
if(i != mSessions.end())
{
+ lg(Debug) << __FUNCTION__ << ": found session to replace : " << oldSession->ice_toString();
toRemove = *i;
toRemove->disconnect();
mSessions.erase(i);
diff --git a/src/MediaSplicer.cpp b/src/MediaSplicer.cpp
index 2af8517..842878d 100644
--- a/src/MediaSplicer.cpp
+++ b/src/MediaSplicer.cpp
@@ -8,6 +8,13 @@
#include "MediaSplicer.h"
#include <IceUtil/Shared.h>
#include <IceUtil/Handle.h>
+#include "logger.h"
+
+using namespace AsteriskSCF::System::Logging;
+namespace
+{
+Logger &lg = getLoggerFactory().getLogger("AsteriskSCF.BridgeService");
+}
namespace AsteriskSCF
{
@@ -50,13 +57,14 @@ namespace BridgeService
void unplug()
{
+ lg(Debug) << __FUNCTION__ << ": unplugging sinks and sources";
std::vector<OutgoingPairing> outgoing;
std::vector<IncomingPairing> incoming;
{
IceUtil::Mutex::Lock lock(mMutex);
- outgoing.swap(mOutgoing);
+ outgoing = mOutgoing;
mOutgoing.clear();
- incoming.swap(mIncoming);
+ incoming = mIncoming;
mIncoming.clear();
}
@@ -66,6 +74,8 @@ namespace BridgeService
//
for(std::vector<OutgoingPairing>::iterator i = outgoing.begin(); i != outgoing.end(); ++i)
{
+ lg(Debug) << __FUNCTION__ << ": disconnecting " << i->second->ice_toString() << " and " << i->first->ice_toString();
+
try
{
i->second->setSink(0);
@@ -83,6 +93,7 @@ namespace BridgeService
}
for(std::vector<IncomingPairing>::iterator i = incoming.begin(); i != incoming.end(); ++i)
{
+ lg(Debug) << __FUNCTION__ << ": disconnecting " << i->first->ice_toString() << " and " << i->second->ice_toString();
try
{
i->first->setSink(0);
@@ -126,6 +137,7 @@ namespace BridgeService
Media::V1::SessionPrx media = session->getMediaSession();
if(!media)
{
+ lg(Debug) << __FUNCTION__ << ": no media available!";
return 0;
}
@@ -139,6 +151,7 @@ namespace BridgeService
{
if(!i->connector->isConnected())
{
+ lg(Debug) << __FUNCTION__ << ": reaping a connector";
MediaSessions::iterator t = i;
mSessions.erase(t);
continue;
@@ -150,6 +163,7 @@ namespace BridgeService
}
if(result)
{
+ lg(Debug) << __FUNCTION__ << ": found an existing matching connector, returning that!";
return result;
}
@@ -165,6 +179,7 @@ namespace BridgeService
std::vector<IncomingPairing> incomingPairings(findCompatiblePairings(sources));
result = new MediaConnectorI(outgoingPairings, incomingPairings);
+ lg(Debug) << __FUNCTION__ << ": established connections, returning connector object";
mSessions.push_back(MediaSessionStruct(media, result));
return result;
}
-----------------------------------------------------------------------
--
asterisk-scf/integration/bridging.git
More information about the asterisk-scf-commits
mailing list