[asterisk-scf-commits] asterisk-scf/release/sip.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Jun 1 11:26:51 CDT 2011


branch "master" has been updated
       via  d85f529e42fa80a0a9f3309c34aab9d5b19fa1cc (commit)
      from  edef933ea00de1a54440827f7731e7732d06efeb (commit)

Summary of changes:
 src/PJSipLoggingModule.h |    2 ++
 src/PJSipManager.cpp     |    4 ++--
 src/PJSipManager.h       |    8 ++++----
 3 files changed, 8 insertions(+), 6 deletions(-)


- Log -----------------------------------------------------------------
commit d85f529e42fa80a0a9f3309c34aab9d5b19fa1cc
Author: Joshua Colp <jcolp at digium.com>
Date:   Wed Jun 1 13:23:56 2011 -0300

    Use smart pointers so the reference count is properly reflected.

diff --git a/src/PJSipLoggingModule.h b/src/PJSipLoggingModule.h
index 043187e..94e93e2 100644
--- a/src/PJSipLoggingModule.h
+++ b/src/PJSipLoggingModule.h
@@ -39,5 +39,7 @@ public:
     void on_tsx_state(pjsip_transaction *tsx, pjsip_event *event);
 };
 
+typedef IceUtil::Handle<PJSipLoggingModule> PJSipLoggingModulePtr;
+
 };
 };
diff --git a/src/PJSipManager.cpp b/src/PJSipManager.cpp
index 15f0c03..c8b4462 100644
--- a/src/PJSipManager.cpp
+++ b/src/PJSipManager.cpp
@@ -96,12 +96,12 @@ void PJSipManager::registerLoggingModule()
     mLoggingModule = new PJSipLoggingModule(mEndpoint);
 }
 
-PJSipSessionModule *PJSipManager::getSessionModule()
+PJSipSessionModulePtr PJSipManager::getSessionModule()
 {
     return mSessionModule;
 }
 
-PJSipLoggingModule *PJSipManager::getLoggingModule()
+PJSipLoggingModulePtr PJSipManager::getLoggingModule()
 {
     return mLoggingModule;
 }
diff --git a/src/PJSipManager.h b/src/PJSipManager.h
index ef7e457..9138770 100644
--- a/src/PJSipManager.h
+++ b/src/PJSipManager.h
@@ -58,12 +58,12 @@ public:
     /**
      * Get a reference to the PJSIP session module
      */
-    PJSipSessionModule *getSessionModule();
+    PJSipSessionModulePtr getSessionModule();
 
     /**
      * Get a reference to the PJSIP logging module
      */
-    PJSipLoggingModule *getLoggingModule();
+    PJSipLoggingModulePtr getLoggingModule();
 
     /**
      * Register the PJSipSessionModule, responsible
@@ -100,8 +100,8 @@ public:
 private:
     static PJSipManager *mInstance;
     pjsip_endpoint *mEndpoint;
-    PJSipSessionModule *mSessionModule;
-    PJSipLoggingModule *mLoggingModule;
+    PJSipSessionModulePtr mSessionModule;
+    PJSipLoggingModulePtr mLoggingModule;
     pj_thread_t *mPjThread;
     pj_caching_pool mCachingPool;
     pj_pool_t *mMemoryPool;

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


-- 
asterisk-scf/release/sip.git



More information about the asterisk-scf-commits mailing list