[asterisk-scf-commits] asterisk-scf/integration/sip.git branch "no_c++11" created.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Nov 18 18:37:18 CST 2011


branch "no_c++11" has been created
        at  ed802671be32b78207e3b149079c79f6639cc3b5 (commit)

- Log -----------------------------------------------------------------
commit ed802671be32b78207e3b149079c79f6639cc3b5
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Fri Nov 18 18:35:32 2011 -0600

    When _HAS_CPP0X=0 is used on Windows, the code modified no longer compiled. The template compiler couldn't deduce that the string literals should be std::string typed, so I made it explicit.

diff --git a/src/AuthManager.cpp b/src/AuthManager.cpp
index b5319e3..380457c 100644
--- a/src/AuthManager.cpp
+++ b/src/AuthManager.cpp
@@ -86,19 +86,19 @@ public:
     
         if (pj_strlen(&sipURI->user_param) != 0)
         {
-            params.insert(std::make_pair("user",
+            params.insert(std::make_pair(std::string("user"),
                         std::string(pj_strbuf(&sipURI->user_param),
                             pj_strlen(&sipURI->user_param))));
         }
         if (pj_strlen(&sipURI->method_param) != 0)
         {
-            params.insert(std::make_pair("method",
+            params.insert(std::make_pair(std::string("method"),
                         std::string(pj_strbuf(&sipURI->method_param),
                             pj_strlen(&sipURI->method_param))));
         }
         if (pj_strlen(&sipURI->transport_param) != 0)
         {
-            params.insert(std::make_pair("transport",
+            params.insert(std::make_pair(std::string("transport"),
                         std::string(pj_strbuf(&sipURI->transport_param),
                             pj_strlen(&sipURI->transport_param))));
         }
@@ -106,13 +106,13 @@ public:
         {
             std::stringstream stream;
             stream << sipURI->ttl_param;
-            params.insert(std::make_pair("ttl", stream.str()));
+            params.insert(std::make_pair(std::string("ttl"), stream.str()));
         }
         //lr has no value associated with it. It either is there or it is not there. It is
         //the redheaded stepchild of the SIP URI parameter world. I weep for it.
         if (sipURI->lr_param != 0)
         {
-            params.insert(std::make_pair("lr", std::string()));
+            params.insert(std::make_pair(std::string("lr"), std::string()));
         }
     
         for (pjsip_param *iter = sipURI->other_param.next;

commit 585a2423a3a9ec40221c0310986e8d0064b28bbe
Author: Joshua Colp <jcolp at digium.com>
Date:   Fri Nov 11 16:04:22 2011 -0400

    You see nothing.

diff --git a/src/SipEndpoint.cpp b/src/SipEndpoint.cpp
index 7d40d71..5532300 100644
--- a/src/SipEndpoint.cpp
+++ b/src/SipEndpoint.cpp
@@ -105,7 +105,7 @@ public:
         mDescriptorService->begin_getDescriptor(mFormat, descriptorCB);
     }
 
-    void getNamedFormatFailureCB(const Ice::Exception&)
+    void getNamedFormatFailureCB(const Ice::Exception& ex)
     {
         lg(Error) << "getNamedFormat failed for format " << printFormat() << " as exception " << ex.what() << " received";
     }
@@ -119,7 +119,7 @@ public:
 	mAvailable = true;
     }
 
-    void getDescriptorFailureCB(const Ice::Exception&)
+    void getDescriptorFailureCB(const Ice::Exception& ex)
     {
         lg(Error) << "getDescriptor failed for format " << printFormat() << " as exception " << ex.what() << " received";
     }

commit 96ecfc96638614b5bbe85a9094bc16c0a1cfdf96
Author: Joshua Colp <jcolp at digium.com>
Date:   Fri Nov 11 14:52:46 2011 -0400

    Tweak log levels/messages. (issue ASTSCF-383)

diff --git a/src/AuthManager.cpp b/src/AuthManager.cpp
index 0bd0d15..b5319e3 100644
--- a/src/AuthManager.cpp
+++ b/src/AuthManager.cpp
@@ -163,7 +163,7 @@ bool AuthInstance::authenticate(pjsip_rx_data *rdata)
         case PJSIP_EAUTHINVALIDREALM:
         case PJSIP_EAUTHINVALIDDIGEST:
         default:
-            mImpl->mLogger(Warning) << "Could not auth";
+            mImpl->mLogger(Warning) << "Could not authenticate";
         }
     }
     return false;
diff --git a/src/Component.cpp b/src/Component.cpp
index 84f6837..3f1c5b3 100644
--- a/src/Component.cpp
+++ b/src/Component.cpp
@@ -321,8 +321,9 @@ void Component::listenToStateReplicators()
     }
     catch (const Ice::Exception& e)
     {
-        lg(Error) << e.what();
-        throw;
+        lg(Error) << "Unable to add state replicator listener in " << getName() << BOOST_CURRENT_FUNCTION <<
+            ". Exception: " << e.what();
+        throw; // rethrow
     }
 }
 
@@ -348,8 +349,9 @@ void Component::stopListeningToStateReplicators()
     }
     catch (const Ice::Exception& e)
     {
-        lg(Error) << e.what();
-        throw;
+        lg(Error) << "Unable to remove state replicator listener in " << getName() << BOOST_CURRENT_FUNCTION <<
+            ". Exception: " << e.what();
+        throw; // rethrow
     }
 }
 
@@ -430,7 +432,7 @@ void Component::onPreInitialize()
     }
     catch(const std::exception& e)
     {
-        lg(Critical) << "Major problems in " << getName() << " initialization: " << e.what();
+        lg(Critical) << "Communicator or PJSipManager failure in " << getName() << " initialization: " << e.what();
     }
 }
 
@@ -507,7 +509,7 @@ void Component::onPostInitialize()
     }
     catch(const std::exception& e)
     {
-        lg(Critical) << "Major problems in " << getName() << " initialization: " << e.what();
+        lg(Critical) << "Major PJSIP module failure in " << getName() << " initialization: " << e.what();
     }
 }
 
diff --git a/src/PJSipLoggingModule.cpp b/src/PJSipLoggingModule.cpp
index 6e6a3fb..74b29a2 100644
--- a/src/PJSipLoggingModule.cpp
+++ b/src/PJSipLoggingModule.cpp
@@ -54,29 +54,29 @@ pj_status_t PJSipLoggingModule::unload()
 
 pj_bool_t PJSipLoggingModule::on_rx_request(pjsip_rx_data *rdata)
 {
-    lg(Debug) << "Incoming SIP request" << std::endl;
-    lg(Debug) << rdata->pkt_info.packet << std::endl;
+    lg(Trace) << "Incoming SIP request" << std::endl;
+    lg(Trace) << rdata->pkt_info.packet << std::endl;
     return PJ_FALSE;
 }
 
 pj_bool_t PJSipLoggingModule::on_rx_response(pjsip_rx_data *rdata)
 {
-    lg(Debug) << "Incoming SIP response" << std::endl;
-    lg(Debug) << rdata->pkt_info.packet << std::endl;
+    lg(Trace) << "Incoming SIP response" << std::endl;
+    lg(Trace) << rdata->pkt_info.packet << std::endl;
     return PJ_FALSE;
 }
 
 pj_status_t PJSipLoggingModule::on_tx_request(pjsip_tx_data *tdata)
 {
-    lg(Debug) << "Outgoing SIP request" << std::endl;
-    lg(Debug) << tdata->buf.start << std::endl;
+    lg(Trace) << "Outgoing SIP request" << std::endl;
+    lg(Trace) << tdata->buf.start << std::endl;
     return PJ_SUCCESS;
 }
 
 pj_status_t PJSipLoggingModule::on_tx_response(pjsip_tx_data *tdata)
 {
-    lg(Debug) << "Outgoing SIP response" << std::endl;
-    lg(Debug) << tdata->buf.start << std::endl;
+    lg(Trace) << "Outgoing SIP response" << std::endl;
+    lg(Trace) << tdata->buf.start << std::endl;
     return PJ_SUCCESS;
 }
 
diff --git a/src/PJSipManager.cpp b/src/PJSipManager.cpp
index 6beef79..d5c9c32 100644
--- a/src/PJSipManager.cpp
+++ b/src/PJSipManager.cpp
@@ -289,7 +289,7 @@ PJSipManager::PJSipManager() :
     if (!mMemoryPool)
     {
         const char* message = "Failed to create a memory pool";
-        logger(Error) << message;
+        logger(Critical) << message;
         throw InternalInitializationException(message);
     }
     
@@ -298,7 +298,7 @@ PJSipManager::PJSipManager() :
     if (fail(status))
     {
         const char* message = "Failed to create SIP maintenance thread";
-        logger(Error) << message;
+        logger(Critical) << message;
         throw InternalInitializationException(message);
     }
 }
diff --git a/src/PJSipSessionModule.cpp b/src/PJSipSessionModule.cpp
index 9504d47..275f091 100644
--- a/src/PJSipSessionModule.cpp
+++ b/src/PJSipSessionModule.cpp
@@ -215,78 +215,78 @@ void PJSipSessionModule::replicateState(PJSipDialogModInfo *dlgInfo, PJSipTransa
     SipStateItemSeq setItems;
     Ice::StringSeq removeItems;
 
-    lg(Debug) << "========== Begin State Replication Dump ==========";
+    lg(Trace) << "========== Begin State Replication Dump ==========";
 
     if (dlgInfo)
     {
-        lg(Debug) << "--- Begin Dialog " << dlgInfo->mDialogState->key;
-        lg(Debug) << "Callid: " << dlgInfo->mDialogState->callId;
-        lg(Debug) << "Is Dialog Established: " << dlgInfo->mDialogState->isDialogEstablished;
-        lg(Debug) << "Is Secure: " << dlgInfo->mDialogState->isSecure;
-        lg(Debug) << "Local CSeq: " << dlgInfo->mDialogState->localCSeq;
-        lg(Debug) << "Local URI: " << dlgInfo->mDialogState->localUri;
-	lg(Debug) << "Local tag: " << dlgInfo->mDialogState->localTag;
-        lg(Debug) << "Remote CSeq: " << dlgInfo->mDialogState->remoteCSeq;
-        lg(Debug) << "Remote URI: " << dlgInfo->mDialogState->remoteUri;
-	lg(Debug) << "Remote tag: " << dlgInfo->mDialogState->remoteTag;
-        lg(Debug) << "Transport: " << dlgInfo->mDialogState->transport;
-        lg(Debug) << "UAC Has 2xx: " << dlgInfo->mDialogState->uacHas2xx;
-        lg(Debug) << "Is Uac: " << dlgInfo->mDialogState->isUac;
+        lg(Trace) << "--- Begin Dialog " << dlgInfo->mDialogState->key;
+        lg(Trace) << "Callid: " << dlgInfo->mDialogState->callId;
+        lg(Trace) << "Is Dialog Established: " << dlgInfo->mDialogState->isDialogEstablished;
+        lg(Trace) << "Is Secure: " << dlgInfo->mDialogState->isSecure;
+        lg(Trace) << "Local CSeq: " << dlgInfo->mDialogState->localCSeq;
+        lg(Trace) << "Local URI: " << dlgInfo->mDialogState->localUri;
+	lg(Trace) << "Local tag: " << dlgInfo->mDialogState->localTag;
+        lg(Trace) << "Remote CSeq: " << dlgInfo->mDialogState->remoteCSeq;
+        lg(Trace) << "Remote URI: " << dlgInfo->mDialogState->remoteUri;
+	lg(Trace) << "Remote tag: " << dlgInfo->mDialogState->remoteTag;
+        lg(Trace) << "Transport: " << dlgInfo->mDialogState->transport;
+        lg(Trace) << "UAC Has 2xx: " << dlgInfo->mDialogState->uacHas2xx;
+        lg(Trace) << "Is Uac: " << dlgInfo->mDialogState->isUac;
 	if (dlgInfo->mPending == true)
 	{
-	    lg(Debug) << "Dialog is in pending state, not replicating";
+	    lg(Trace) << "Dialog is in pending state, not replicating";
 	}
         else if (dlgInfo->mNeedsRemoval == true)
         {
-            lg(Debug) << "Removing dialog";
+            lg(Trace) << "Removing dialog";
             removeItems.push_back(dlgInfo->mDialogState->key);
         }
         else if (dlgInfo->mNeedsReplication == true)
         {
-            lg(Debug) << "Replicating dialog";
+            lg(Trace) << "Replicating dialog";
             setItems.push_back(dlgInfo->mDialogState);
             dlgInfo->mNeedsReplication = false;
         }
-        lg(Debug) << "--- End Dialog " << dlgInfo->mDialogState->key;
+        lg(Trace) << "--- End Dialog " << dlgInfo->mDialogState->key;
     }
     if (sessionInfo)
     {
         boost::shared_lock<boost::shared_mutex> lock(sessionInfo->mLock);
-        lg(Debug) << "--- Begin Session " << sessionInfo->mSessionState->key;
-        lg(Debug) << "Endpoint name: " << sessionInfo->mSessionState->endpointName;
-        lg(Debug) << "Session object identity: " << sessionInfo->mSessionState->sessionObjectId.name;
-        lg(Debug) << "Media session object identity: " << sessionInfo->mSessionState->mediaSessionObjectId.name;
+        lg(Trace) << "--- Begin Session " << sessionInfo->mSessionState->key;
+        lg(Trace) << "Endpoint name: " << sessionInfo->mSessionState->endpointName;
+        lg(Trace) << "Session object identity: " << sessionInfo->mSessionState->sessionObjectId.name;
+        lg(Trace) << "Media session object identity: " << sessionInfo->mSessionState->mediaSessionObjectId.name;
 
 	for (RTPMediaSessionDict::const_iterator mediaSession = sessionInfo->mSessionState->rtpMediaSessions.begin();
              mediaSession != sessionInfo->mSessionState->rtpMediaSessions.end();
              ++mediaSession)
         {
-            lg(Debug) << "Media session: " << mediaSession->second;
+            lg(Trace) << "Media session: " << mediaSession->second;
         }
 
-        lg(Debug) << "Bridge: " << sessionInfo->mSessionState->bridge;
-        lg(Debug) << "--- Begin Invite Session " << sessionInfo->mInviteState->key;
-        lg(Debug) << "Current state: " << sessionInfo->mInviteState->currentState;
-        lg(Debug) << "Cancelling: " << sessionInfo->mInviteState->cancelling;
-        lg(Debug) << "Pending cancel: " << sessionInfo->mInviteState->pendingCancel;
-        lg(Debug) << "Cause: " << sessionInfo->mInviteState->cause;
-        lg(Debug) << "Cause text: " << sessionInfo->mInviteState->causeText;
-        lg(Debug) << "Notify: " << sessionInfo->mInviteState->notify;
-        lg(Debug) << "Last Ack CSeq: " << sessionInfo->mInviteState->lastAckCseq;
+        lg(Trace) << "Bridge: " << sessionInfo->mSessionState->bridge;
+        lg(Trace) << "--- Begin Invite Session " << sessionInfo->mInviteState->key;
+        lg(Trace) << "Current state: " << sessionInfo->mInviteState->currentState;
+        lg(Trace) << "Cancelling: " << sessionInfo->mInviteState->cancelling;
+        lg(Trace) << "Pending cancel: " << sessionInfo->mInviteState->pendingCancel;
+        lg(Trace) << "Cause: " << sessionInfo->mInviteState->cause;
+        lg(Trace) << "Cause text: " << sessionInfo->mInviteState->causeText;
+        lg(Trace) << "Notify: " << sessionInfo->mInviteState->notify;
+        lg(Trace) << "Last Ack CSeq: " << sessionInfo->mInviteState->lastAckCseq;
         if (sessionInfo->mNeedsRemoval == true)
         {
             removeItems.push_back(sessionInfo->mInviteState->key);
             removeItems.push_back(sessionInfo->mSessionState->key);
-            lg(Debug) << "Removing session and invite session";
+            lg(Trace) << "Removing session and invite session";
         }
         else if (sessionInfo->mNeedsReplication == true)
         {
             setItems.push_back(sessionInfo->mInviteState);
             setItems.insert(setItems.begin(), sessionInfo->mSessionState);
             sessionInfo->mNeedsReplication = false;
-            lg(Debug) << "Replicating session and invite session";
+            lg(Trace) << "Replicating session and invite session";
         }
-        lg(Debug) << "--- End Session and Invite Session";
+        lg(Trace) << "--- End Session and Invite Session";
     }
     if (tsxInfo)
     {
@@ -300,7 +300,7 @@ void PJSipSessionModule::replicateState(PJSipDialogModInfo *dlgInfo, PJSipTransa
             tsxInfo->mNeedsReplication = false;
         }
     }
-    lg(Debug) << "========== End State Replication Dump ==========";
+    lg(Trace) << "========== End State Replication Dump ==========";
     if (mReplicationContext->isReplicating() == true)
     {
         if (setItems.size() != 0)
diff --git a/src/SipEndpoint.cpp b/src/SipEndpoint.cpp
index 7e5a4ca..7d40d71 100644
--- a/src/SipEndpoint.cpp
+++ b/src/SipEndpoint.cpp
@@ -87,9 +87,9 @@ public:
         return str.str();
     }
 
-    void locateFailureCB(const Ice::Exception&)
+    void locateFailureCB(const Ice::Exception& ex)
     {
-        lg(Error) << "Couldn't locate format " << printFormat();
+        lg(Error) << "Couldn't locate format " << printFormat() << " as exception " << ex.what() << " received";
     }
 
     void getNamedFormatCB(const FormatPtr& format)
@@ -107,7 +107,7 @@ public:
 
     void getNamedFormatFailureCB(const Ice::Exception&)
     {
-        lg(Error) << "getNamedFormat failed for format " << printFormat();
+        lg(Error) << "getNamedFormat failed for format " << printFormat() << " as exception " << ex.what() << " received";
     }
 
     void getDescriptorCB(const SDPDescriptorPtr& descriptor)
@@ -121,7 +121,7 @@ public:
 
     void getDescriptorFailureCB(const Ice::Exception&)
     {
-        lg(Error) << "getDescriptor failed for format " << printFormat();
+        lg(Error) << "getDescriptor failed for format " << printFormat() << " as exception " << ex.what() << " received";
     }
 
     SDPDescriptorServicePrx getDescriptorService()

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


-- 
asterisk-scf/integration/sip.git



More information about the asterisk-scf-commits mailing list