[asterisk-scf-commits] asterisk-scf/integration/sip.git branch "threading" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Thu May 19 19:15:00 CDT 2011
branch "threading" has been updated
via 069e20776fc5e0d44dbe7d5e4963167d93e64d6a (commit)
from 56969fd2d98b159e1695d77a689fb78ecbfb6ebf (commit)
Summary of changes:
src/PJSipSessionModule.cpp | 11 ++++-------
src/SipSession.cpp | 42 +++++++++++++++++++++---------------------
2 files changed, 25 insertions(+), 28 deletions(-)
- Log -----------------------------------------------------------------
commit 069e20776fc5e0d44dbe7d5e4963167d93e64d6a
Author: Mark Michelson <mmichelson at digium.com>
Date: Thu May 19 19:10:20 2011 -0500
Make debug messages consistent and actually use the logger.
diff --git a/src/PJSipSessionModule.cpp b/src/PJSipSessionModule.cpp
index 7229342..3882704 100644
--- a/src/PJSipSessionModule.cpp
+++ b/src/PJSipSessionModule.cpp
@@ -334,7 +334,7 @@ public:
SuspendableWorkResult initial(const SuspendableWorkListenerPtr&)
{
- std::cout << "SessionCreationOperation running. About to create a session!" << std::endl;
+ lg(Debug) << "Executing SessionCreationOperation" << std::endl;
try
{
mSession = mCaller->createSession(mDestination);
@@ -476,7 +476,6 @@ void PJSipSessionModule::handleNewInvite(pjsip_rx_data *rdata)
pjsip_transaction *tsx = pjsip_rdata_get_tsx(rdata);
PJSipTransactionModInfo *tsx_mod_info = new PJSipTransactionModInfo(tsx);
tsx->mod_data[mModule.id] = (void *)tsx_mod_info;
- std::cout << "We put mod info into the tsx at address " << tsx << std::endl;
//XXX The sdp argument is NULL for now, but can be changed if we
//know what has been configured for this particular caller.
@@ -926,7 +925,7 @@ public:
SuspendableWorkResult initial(const SuspendableWorkListenerPtr&)
{
- std::cout << "Handling response to an INVITE yo!" << std::endl;
+ lg(Debug) << "Executing HandleInviteResponseOperation" << std::endl;
//Treat all 1XX messages we don't recognize the same as a 180
if (mRespCode > 100 && mRespCode < 200 && mRespCode != 183)
{
@@ -1058,7 +1057,7 @@ public:
SuspendableWorkResult initial(const SuspendableWorkListenerPtr&)
{
- std::cout << "The transaction has address " << mTsx << std::endl;
+ lg(Debug) << "Executing TransactionStateOperation";
PJSipTransactionModInfo *tsx_mod_info = static_cast<PJSipTransactionModInfo *> (mTsx->mod_data[mSessionModule->getModule().id]);
if (!tsx_mod_info)
{
@@ -1161,7 +1160,6 @@ public:
}
lg(Debug) << "Replicating state on DISCONNECTED inv_state.";
mSessionModule->replicateState(dlg_mod_info, NULL, session_mod_info);
- std::cout << "Deleting session mod info on a session" << std::endl;
delete session_mod_info;
mInv->mod_data[mSessionModule->getModule().id] = 0;
if (dlg_mod_info)
@@ -1285,7 +1283,7 @@ void PJSipSessionModule::invOnTsxStateChanged(pjsip_inv_session *inv, pjsip_tran
SipSessionPtr session = session_mod_info->getSessionPtr();
std::string method(pj_strbuf(&tsx->method.name), pj_strlen(&tsx->method.name));
- std::cout << "Queuing a Transaction state operation for transaction " << tsx << " Method: " << method << std::endl;
+ lg(Debug) << "Queuing a Transaction state operation for transaction " << tsx << " Method: " << method;
enqueueSessionWork(new TransactionStateOperation(this, tsx, inv, e->type, tsx->state), inv);
}
}
@@ -1406,7 +1404,6 @@ public:
}
catch (...)
{
- std::cout << "EXCEPTION DURING MEDIA UPDATE????" << std::endl;
// If we get here the format just isn't supported...
}
}
diff --git a/src/SipSession.cpp b/src/SipSession.cpp
index 16930b6..d3fad49 100644
--- a/src/SipSession.cpp
+++ b/src/SipSession.cpp
@@ -364,7 +364,7 @@ public:
SuspendableWorkResult execute(const SuspendableWorkListenerPtr&)
{
- std::cout << "Actually executing addListener logic" << std::endl;
+ lg(Debug) << "Executing addListener operation";
mImplPriv->addListener(mListener);
AsteriskSCF::SessionCommunications::V1::SessionInfoPtr sessionInfo =
mImplPriv->getInfo();
@@ -382,7 +382,7 @@ void SipSession::addListener_async(
const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener,
const Ice::Current&)
{
- std::cout << "addListener called. Queueing operation..." << std::endl;
+ lg(Debug) << "Queueing addListener operation";
enqueueSessionWork(new AddListenerOperation(cb, listener, mImplPriv));
}
@@ -398,7 +398,7 @@ public:
SuspendableWorkResult execute(const SuspendableWorkListenerPtr&)
{
- std::cout << "Executing indicate operation" << std::endl;
+ lg(Debug) << "Executing indicate operation";
AsteriskSCF::SessionCommunications::V1::ConnectIndicationPtr Connect;
AsteriskSCF::SessionCommunications::V1::FlashIndicationPtr Flash;
AsteriskSCF::SessionCommunications::V1::HoldIndicationPtr Hold;
@@ -463,7 +463,7 @@ void SipSession::indicate_async(
const AsteriskSCF::SessionCommunications::V1::IndicationPtr& indication,
const Ice::Current&)
{
- std::cout << "Queuing an indicate operation" << std::endl;
+ lg(Debug) << "Queuing an indicate operation";
enqueueSessionWork(new IndicateOperation(cb, indication, mImplPriv, this));
}
@@ -477,7 +477,7 @@ public:
SuspendableWorkResult execute(const SuspendableWorkListenerPtr&)
{
- std::cout << "Executing a getEndpoint Operation" << std::endl;
+ lg(Debug) << "Executing a getEndpoint Operation";
mCb->ice_response(mImplPriv->mEndpoint->getEndpointProxy());
return Complete;
}
@@ -493,7 +493,7 @@ void SipSession::getEndpoint_async(
const AsteriskSCF::SessionCommunications::V1::AMD_Session_getEndpointPtr& cb,
const Ice::Current&)
{
- std::cout << "Queuing a getEndpoint operation" << std::endl;
+ lg(Debug) << "Queuing a getEndpoint operation";
enqueueSessionWork(new GetEndpointOperation(cb, mImplPriv));
}
@@ -507,7 +507,7 @@ public:
SuspendableWorkResult execute(const SuspendableWorkListenerPtr&)
{
- std::cout << "Executing a GetInfo operation" << std::endl;
+ lg(Debug) << "Executing a GetInfo operation";
AsteriskSCF::SessionCommunications::V1::SessionInfoPtr sessionInfo =
mImplPriv->getInfo();
@@ -526,7 +526,7 @@ void SipSession::getInfo_async(
const AsteriskSCF::SessionCommunications::V1::AMD_Session_getInfoPtr& cb,
const Ice::Current&)
{
- std::cout << "queuing a getInfo operation" << std::endl;
+ lg(Debug) << "queuing a getInfo operation";
enqueueSessionWork(new GetInfoOperation(cb, mImplPriv));
}
@@ -540,7 +540,7 @@ public:
SuspendableWorkResult execute(const SuspendableWorkListenerPtr&)
{
- std::cout << "Executing a GetMediaSession operation" << std::endl;
+ lg(Debug) << "Executing a GetMediaSession operation";
mCb->ice_response(mImplPriv->mMediaSessionProxy);
return Complete;
}
@@ -556,7 +556,7 @@ void SipSession::getMediaSession_async(
const AsteriskSCF::SessionCommunications::V1::AMD_Session_getMediaSessionPtr& cb,
const Ice::Current&)
{
- std::cout << "queuing a getMediaSession operation" << std::endl;
+ lg(Debug) << "queuing a getMediaSession operation";
enqueueSessionWork(new GetMediaSessionOperation(cb, mImplPriv));
}
@@ -569,7 +569,7 @@ public:
SuspendableWorkResult execute(const SuspendableWorkListenerPtr&)
{
- std::cout << "Executing a GetBridge operation" << std::endl;
+ lg(Debug) << "Executing a GetBridge operation";
AsteriskSCF::SessionCommunications::V1::BridgePrx bridge;
try
{
@@ -595,7 +595,7 @@ void SipSession::getBridge_async(
const AsteriskSCF::SessionCommunications::V1::AMD_Session_getBridgePtr& cb,
const Ice::Current&)
{
- std::cout << "queuing a getBridge operation" << std::endl;
+ lg(Debug) << "queuing a getBridge operation";
enqueueSessionWork(new GetBridgeOperation(cb, mImplPriv));
}
@@ -613,7 +613,7 @@ public:
SuspendableWorkResult execute(const SuspendableWorkListenerPtr&)
{
- std::cout << "Executing a SetBridge operation" << std::endl;
+ lg(Debug) << "Executing a SetBridge operation";
mSession->setBridge(mBridge);
mImplPriv->addListener(mListener);
mCb->ice_response(mImplPriv->getInfo());
@@ -637,7 +637,7 @@ void SipSession::setBridge_async(
const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener,
const Ice::Current& current)
{
- std::cout << "queuing a setBridge operation" << std::endl;
+ lg(Debug) << "queuing a setBridge operation";
enqueueSessionWork(new SetBridgeOperation(cb, this, mImplPriv, bridge, listener, current));
}
@@ -695,7 +695,7 @@ void SipSession::removeBridge_async(
const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener,
const Ice::Current& current)
{
- std::cout << "queuing a removeBridge operation" << std::endl;
+ lg(Debug) << "queuing a removeBridge operation";
enqueueSessionWork(new RemoveBridgeOperation(cb, this, mImplPriv, listener, current));
}
@@ -709,7 +709,7 @@ public:
SuspendableWorkResult execute(const SuspendableWorkListenerPtr&)
{
- std::cout << "Actually removing listener" << std::endl;
+ lg(Debug) << "Actually removing listener";
mImplPriv->removeListener(mListener);
return Complete;
}
@@ -722,7 +722,7 @@ public:
*/
void SipSession::removeListener(const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener, const Ice::Current&)
{
- std::cout << "removeListener called. Queuing operation" << std::endl;
+ lg(Debug) << "removeListener called. Queuing operation";
enqueueSessionWork(new RemoveListenerOperation(listener, mImplPriv));
}
@@ -764,7 +764,7 @@ public:
*/
void SipSession::start(const Ice::Current&)
{
- std::cout << "We've been asked to start a session." << std::endl;
+ lg(Debug) << "We've been asked to start a session.";
enqueueSessionWork(new StartOperation(this, mImplPriv));
}
@@ -809,7 +809,7 @@ public:
*/
void SipSession::stop(const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr& response, const Ice::Current&)
{
- std::cout << "queuing a stop operation" << std::endl;
+ lg(Debug) << "queuing a stop operation";
enqueueSessionWork(new StopOperation(response, mImplPriv->mInviteSession));
}
@@ -857,7 +857,7 @@ public:
*/
void SipSession::destroy()
{
- std::cout << "queuing a destroy operation" << std::endl;
+ lg(Debug) << "queuing a destroy operation";
enqueueSessionWork(new DestroyOperation(this, mImplPriv));
}
@@ -1075,7 +1075,7 @@ void SipSession::enqueueSessionWork(const SuspendableWorkPtr& task)
{
if (!mImplPriv->mInviteSession)
{
- std::cout << "No invite session yet. Unable to queue operation" << std::endl;
+ lg(Debug) << "No invite session yet. Unable to queue operation";
return;
}
PJSipSessionModInfo *session_mod_info =
-----------------------------------------------------------------------
--
asterisk-scf/integration/sip.git
More information about the asterisk-scf-commits
mailing list