[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
Wed Sep 15 09:16:04 CDT 2010
branch "master" has been updated
via ac0aa68aecaed3a64108217ac1bc1e209b98678f (commit)
from e0295f94739862ed72957365d4768fbfd81b0400 (commit)
Summary of changes:
slice | 2 +-
src/BridgeImpl.cpp | 34 ++++++++++++++++++++++++++++++++++
2 files changed, 35 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit ac0aa68aecaed3a64108217ac1bc1e209b98678f
Author: Brent Eagles <beagles at digium.com>
Date: Wed Sep 15 11:40:31 2010 -0230
Add InvalidSessions check to bridge implementation
diff --git a/slice b/slice
index 200c642..24e811f 160000
--- a/slice
+++ b/slice
@@ -1 +1 @@
-Subproject commit 200c642ce49b3daabeabe2d8ad105bfa980fec02
+Subproject commit 24e811fa21d491a9a3549ff9192e7b7fc9b83081
diff --git a/src/BridgeImpl.cpp b/src/BridgeImpl.cpp
index 127af28..ea843d7 100644
--- a/src/BridgeImpl.cpp
+++ b/src/BridgeImpl.cpp
@@ -246,6 +246,23 @@ AsteriskSCF::BridgeService::BridgeImpl::~BridgeImpl()
void AsteriskSCF::BridgeService::BridgeImpl::addSessions(const AsteriskSCF::SessionCommunications::V1::SessionSeq& sessions, const Ice::Current& current)
{
+ if(sessions.size() == 0)
+ {
+ return;
+ }
+ unsigned long index = 0;
+ Ice::LongSeq badIndexes;
+ for(AsteriskSCF::SessionCommunications::V1::SessionSeq::const_iterator i = sessions.begin(); i != sessions.end(); ++i, ++index)
+ {
+ if(*i == 0)
+ {
+ badIndexes.push_back(index);
+ }
+ }
+ if(badIndexes.size() > 0)
+ {
+ throw AsteriskSCF::SessionCommunications::Bridging::V1::InvalidSessions(badIndexes);
+ }
AsteriskSCF::SessionCommunications::V1::SessionSeq addedSessions;
{
boost::unique_lock<boost::shared_mutex> lock(mLock);
@@ -288,6 +305,23 @@ void AsteriskSCF::BridgeService::BridgeImpl::addSessions(const AsteriskSCF::Sess
void AsteriskSCF::BridgeService::BridgeImpl::removeSessions(const AsteriskSCF::SessionCommunications::V1::SessionSeq& sessions, const Ice::Current& current)
{
+ if(sessions.size() == 0)
+ {
+ return;
+ }
+ unsigned long index = 0;
+ Ice::LongSeq badIndexes;
+ for(AsteriskSCF::SessionCommunications::V1::SessionSeq::const_iterator i = sessions.begin(); i != sessions.end(); ++i, ++index)
+ {
+ if(*i == 0)
+ {
+ badIndexes.push_back(index);
+ }
+ }
+ if(badIndexes.size() > 0)
+ {
+ throw AsteriskSCF::SessionCommunications::Bridging::V1::InvalidSessions(badIndexes);
+ }
AsteriskSCF::SessionCommunications::V1::SessionSeq removedSessions;
{
boost::unique_lock<boost::shared_mutex> lock(mLock);
-----------------------------------------------------------------------
--
asterisk-scf/integration/bridging.git
More information about the asterisk-scf-commits
mailing list