[asterisk-scf-commits] asterisk-scf/integration/sip.git branch "registrar-bugs" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Dec 14 17:37:48 CST 2011


branch "registrar-bugs" has been updated
       via  a19f5bae3e04bba3c314643a66e8cf94545cf57f (commit)
      from  3dcea8b184feec0f4e8b6f45835135c2d9d00fa8 (commit)

Summary of changes:
 src/PJSipRegistrarModule.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


- Log -----------------------------------------------------------------
commit a19f5bae3e04bba3c314643a66e8cf94545cf57f
Author: Mark Michelson <mmichelson at digium.com>
Date:   Wed Dec 14 17:36:12 2011 -0600

    Address review feedback
    
    * Use a const_iterator where I can.
    * Change the equality operators back to how they were. Turns out that I did not
      need to alter them at all. The '*' comparison only needed to be used in one place
      and it's a place I had failed to alter.

diff --git a/src/PJSipRegistrarModule.cpp b/src/PJSipRegistrarModule.cpp
index c8447b8..99704d1 100644
--- a/src/PJSipRegistrarModule.cpp
+++ b/src/PJSipRegistrarModule.cpp
@@ -98,12 +98,12 @@ BindingWrapper::BindingWrapper(
 
 bool BindingWrapper::operator==(const BindingWrapper& rhs)
 {
-    return (mBinding->contact == rhs.mBinding->contact) || rhs.mBinding->contact == "*" || mBinding->contact == "*";
+    return (mBinding->contact == rhs.mBinding->contact);
 }
 
 bool BindingWrapper::operator==(const BindingPtr& rhs)
 {
-    return (mBinding->contact == rhs->contact) || rhs->contact == "*" || mBinding->contact == "*";
+    return (mBinding->contact == rhs->contact);
 }
 
 void BindingWrapper::cancelRegistrationExpiration()
@@ -638,7 +638,7 @@ BindingWrapperSeq::iterator PJSipRegistrarModule::findMatchingBinding(pjsip_cont
     for (BindingWrapperSeq::iterator iter = bindings.begin(); iter != bindings.end(); ++iter)
     {
         lg(Debug) << "Comparing REGISTER contact " << contactURIStr << " with binding contact " << (*iter)->mBinding->contact;
-        if (contactURIStr == (*iter)->mBinding->contact)
+        if (contactURIStr == (*iter)->mBinding->contact || contactURIStr == "*")
         {
             lg(Debug) << "Found matching binding " << (*iter)->mBinding->contact;
             return iter;

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


-- 
asterisk-scf/integration/sip.git



More information about the asterisk-scf-commits mailing list