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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Mon Sep 5 15:16:05 CDT 2011


branch "sessionparty2" has been updated
       via  ddf5f2abe6409e35beac498f1825c73db3293bd6 (commit)
      from  e0cbf32d3bbbc169cfa293bf23e8f9bfc0773c94 (commit)

Summary of changes:
 config/SipConfigurator.py |    2 +-
 src/SipConfiguration.cpp  |    9 ---------
 src/SipEndpointFactory.h  |    2 --
 src/SipSession.cpp        |   36 ++++++++++++++----------------------
 4 files changed, 15 insertions(+), 34 deletions(-)


- Log -----------------------------------------------------------------
commit ddf5f2abe6409e35beac498f1825c73db3293bd6
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Mon Sep 5 15:17:13 2011 -0500

    Updates.

diff --git a/config/SipConfigurator.py b/config/SipConfigurator.py
index f7d21fe..0cd2c4d 100755
--- a/config/SipConfigurator.py
+++ b/config/SipConfigurator.py
@@ -22,7 +22,7 @@
 import Ice, Configurator, sys, os, traceback
 
 # Load our component specific configuration definitions
-Ice.loadSlice('-I. -IC:/Ice-3.4.1/slice -I../slice/slice -I../sip/slice --all ../sip/slice/AsteriskSCF/Configuration/SipSessionManager/SipConfigurationIf.ice')
+Ice.loadSlice("--underscore -I" + os.environ["ASTSCF_HOME"] + " -I" + Ice.getSliceDir() + " --all ../slice/AsteriskSCF/Configuration/SipSessionManager/SipConfigurationIf.ice")
 
 import AsteriskSCF.Configuration.SipSessionManager.V1
 
diff --git a/src/SipConfiguration.cpp b/src/SipConfiguration.cpp
index 4874e7d..5c2bca9 100644
--- a/src/SipConfiguration.cpp
+++ b/src/SipConfiguration.cpp
@@ -1217,15 +1217,6 @@ public:
         return 0;
     }
 
-    void updateReferences()
-    {
-        for(EndpointMap::const_iterator i = mEndpoints.begin();
-            i != mEndpoints.end(); ++i)
-        {
-            
-        }
-    }
-
 private:
 
     boost::shared_mutex mLock;
diff --git a/src/SipEndpointFactory.h b/src/SipEndpointFactory.h
index 40f1713..13a63ed 100644
--- a/src/SipEndpointFactory.h
+++ b/src/SipEndpointFactory.h
@@ -51,8 +51,6 @@ public:
 
     void generateRoutingDestinations(AsteriskSCF::Core::Routing::V1::RegExSeq&);
 
-    void updateReferences();
-
 private:
     /**
      * A pointer to the object adapter that endpoints will be added to.
diff --git a/src/SipSession.cpp b/src/SipSession.cpp
index d5eb792..fbfb188 100755
--- a/src/SipSession.cpp
+++ b/src/SipSession.cpp
@@ -96,9 +96,9 @@ private:
 /**
  * A class that identifies a set of read-only cookie types.
  * The types in this set will be protected from being altered
- * by the general-purpose setCookies() operation. These types 
+ * by the general-purpose setCookies() operation. (Such types 
  * may, however, be altered via some other API that has the 
- * privilege to to do so. 
+ * privilege to to do so.)
  * Note: immutable class. 
  */
 class ReadOnlyCookieTypes
@@ -106,22 +106,15 @@ class ReadOnlyCookieTypes
 public:
     ReadOnlyCookieTypes()
     {
-        // All of the Party Identification cookies must be set 
-        // through API calls. 
-        DialedPtr dialed = new Dialed();
-        registerType(dialed);
+        registerType(Dialed::ice_staticId());
 
-        CallerPtr caller = new Caller();
-        registerType(caller);
+        registerType(Caller::ice_staticId());
 
-        SessionOwnerIdPtr sessionOwnerId = new SessionOwnerId();
-        registerType(sessionOwnerId);
+        registerType(SessionOwnerId::ice_staticId());
 
-        ConnectedLinePtr connectedLine = new ConnectedLine();
-        registerType(connectedLine);
+        registerType(ConnectedLine::ice_staticId());
 
-        RedirectingPtr redirecting = new Redirecting();
-        registerType(redirecting);
+        registerType(Redirecting::ice_staticId());
     }
 
     bool contains(const std::string& cookieTypeId) const 
@@ -132,12 +125,12 @@ public:
 
 private:
 
-    void registerType(SessionCookiePtr cookie)
+    void registerType(const std::string& type)
     {
-         mRegisteredTypes[cookie->ice_id()] = cookie->ice_id();
+         mRegisteredTypes.insert(type);
     }
 
-    std::map<std::string, std::string> mRegisteredTypes;
+    std::set<std::string> mRegisteredTypes;
 };
 
 
@@ -702,7 +695,7 @@ public:
              ++i)
         {
             string cookieType = (*i)->ice_id();
-            if (mImplPriv->isCookieReadOnly(cookieType))
+            if ((mPrivileged == false) && mImplPriv->isCookieReadOnly(cookieType))
             {
                 lg(Debug) << "setCookies attempted to set read-only cookie of type " << cookieType;
                 continue;
@@ -797,17 +790,16 @@ void SipSession::setSelfAsCaller()
         lg(Info) << "Party Id information not configured. " << BOOST_CURRENT_FUNCTION << 
              "Can't update session Caller info. Endpoint" << mImplPriv->mEndpoint->getName();
         return;
-    }
+    } 
 
     SessionOwnerIdPtr owner = SessionOwnerIdPtr::dynamicCast(search->second);
     CallerPtr caller = new Caller(owner->ids);
     mImplPriv->mSessionCookies[caller->ice_id()] = caller;
 
-    // If we're the caller, we know the Dialed info as well. 
+    // Since we're the caller, we know the Dialed info as well. 
     NumberPtr number = new Number(mImplPriv->mDestination);
     DialedPtr dialed = new Dialed(number);
-
-    mImplPriv->mSessionCookies[caller->ice_id()] = caller;
+    mImplPriv->mSessionCookies[dialed->ice_id()] = dialed;
 }
 
 void SipSession::initializePJSIPStructs()

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


-- 
asterisk-scf/integration/sip.git



More information about the asterisk-scf-commits mailing list