[asterisk-scf-commits] asterisk-scf/release/bridging.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Tue May 31 13:01:50 CDT 2011
branch "master" has been updated
via 87dbea8306aae28375fd8e0676f79825ba260dce (commit)
from e52dc2dbaa0b0afd56ef90dae7d8371eac83e871 (commit)
Summary of changes:
src/SessionWrapper.cpp | 24 +++++++++++++++++-------
1 files changed, 17 insertions(+), 7 deletions(-)
- Log -----------------------------------------------------------------
commit 87dbea8306aae28375fd8e0676f79825ba260dce
Author: Brent Eagles <beagles at digium.com>
Date: Tue May 31 15:30:42 2011 -0230
Added a "continue on exception flag to RemoveBridgeTask" to allow following tasks to continue.
diff --git a/src/SessionWrapper.cpp b/src/SessionWrapper.cpp
index cf7404f..23ee5b9 100644
--- a/src/SessionWrapper.cpp
+++ b/src/SessionWrapper.cpp
@@ -105,10 +105,11 @@ private:
class RemoveBridgeTask : public QueuedTask
{
public:
- RemoveBridgeTask(const SessionWrapperPtr& session, const SessionListenerPrx& listener) :
+ RemoveBridgeTask(const SessionWrapperPtr& session, const SessionListenerPrx& listener, bool continueOnEx) :
QueuedTask("RemoveBridgeTask"),
mSession(session),
- mSessionListener(listener)
+ mSessionListener(listener),
+ mContinueOnException(continueOnEx)
{
}
@@ -138,13 +139,21 @@ protected:
// This is most likely ok, it just means removeBridge was called
// twice.
//
+ mListener->succeeded();
}
catch (...)
{
- //
- // TODO: Log exception.
- //
- mListener->failed();
+ if (mContinueOnException)
+ {
+ mListener->succeeded();
+ }
+ else
+ {
+ //
+ // TODO: Log exception.
+ //
+ mListener->failed();
+ }
}
}
@@ -165,6 +174,7 @@ protected:
private:
SessionWrapperPtr mSession;
SessionListenerPrx mSessionListener;
+ bool mContinueOnException;
};
class SessionStopTask : public QueuedTask
@@ -341,7 +351,7 @@ QueuedTasks createShutdownTasks(const SessionWrapperPtr& session, const SessionL
tasks.push_back(new SetStateFromTask(session, ::AsteriskSCF::Bridge::V1::Disconnected, statesToContinueOn));
if (code)
{
- tasks.push_back(new RemoveBridgeTask(session, listener));
+ tasks.push_back(new RemoveBridgeTask(session, listener, true));
tasks.push_back(new ShutdownMediaTask(session));
tasks.push_back(new SessionStopTask(session, code));
}
-----------------------------------------------------------------------
--
asterisk-scf/release/bridging.git
More information about the asterisk-scf-commits
mailing list