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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Sun Jun 26 23:41:32 CDT 2011


branch "registrar" has been updated
       via  ef373b282be4a218a92e9981fc0c3163c181603b (commit)
       via  0a84ba53e4041c3d0afcab7caf954529b60b6f63 (commit)
      from  768256f0d324d42905eb9f3832c054193cd750b2 (commit)

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


- Log -----------------------------------------------------------------
commit ef373b282be4a218a92e9981fc0c3163c181603b
Author: Mark Michelson <mmichelson at digium.com>
Date:   Sun Jun 26 23:41:22 2011 -0500

    Add XXX comments so I know what to tackle next.

diff --git a/src/PJSipRegistrarModule.cpp b/src/PJSipRegistrarModule.cpp
index f6b2fa3..8fd413e 100644
--- a/src/PJSipRegistrarModule.cpp
+++ b/src/PJSipRegistrarModule.cpp
@@ -66,8 +66,6 @@ private:
 static void registrationExpired(pj_timer_heap_t *, struct pj_timer_entry *entry)
 {
     BindingWrapper *wrapper = static_cast<BindingWrapper *>(entry->user_data);
-    //Create a BindingWrapperPtr so that when we remove the wrapper from the
-    //registrar, it doesn't get deleted.
     wrapper->mRegModule->getRegistrar()->getQueue()->enqueueWork(new RegistrationExpired(wrapper));
 }
 
@@ -82,8 +80,8 @@ BindingWrapper::BindingWrapper(
     : mRegModule(regModule), mBinding(binding), mEndpoint(endpt), mAOR(aor)
 {
     pj_timer_entry_init(&mEntry, expirationId++, this, registrationExpired);
-    pj_time_val delay = {expiration, 0};
     lg(Debug) << "Scheduling binding " << mBinding->contact << " for expiration in " << expiration << " seconds.";
+    scheduleRegistrationExpiration(expiration);
     pjsip_endpt_schedule_timer(mEndpoint, &mEntry, &delay);
 }
 
@@ -367,6 +365,11 @@ QueuePtr RegistrarI::getQueue()
     return mQueue;
 }
 
+//XXX
+//This function is called both from the work queue and from outside the
+//work queue. Either this needs to be made into its own queueable operation,
+//or it needs locking. Preferably, this will just be another queueable operation
+//though.
 void PJSipRegistrarModule::replicateState(
         const std::string &aor,
         const BindingWrapperSeq& existingBindings,
@@ -428,6 +431,9 @@ void PJSipRegistrarModule::replicateState(
     }
 }
 
+//XXX This and the method that queues this work should
+//have different names. It's easy to get confused with 
+//UpdateBinding, and this could stand to be more descriptive
 class UpdateBindings : public Work
 {
 public:

commit 0a84ba53e4041c3d0afcab7caf954529b60b6f63
Author: Mark Michelson <mmichelson at digium.com>
Date:   Sun Jun 26 23:21:40 2011 -0500

    Remove XXX "Queueable operation comments."

diff --git a/src/PJSipRegistrarModule.cpp b/src/PJSipRegistrarModule.cpp
index 0425179..f6b2fa3 100644
--- a/src/PJSipRegistrarModule.cpp
+++ b/src/PJSipRegistrarModule.cpp
@@ -189,7 +189,6 @@ private:
     RegistrarIPtr mRegistrar;
 };
 
-//XXX Queueable operation
 void RegistrarI::addListener_async(
         const AMD_Registrar_addListenerPtr& cb,
         const RegistrarListenerPrx& listener,
@@ -222,7 +221,6 @@ private:
 
 };
 
-//XXX Queueable operation
 void RegistrarI::removeListener_async(
         const AMD_Registrar_removeListenerPtr& cb,
         const RegistrarListenerPrx& listener,
@@ -267,7 +265,6 @@ private:
     RegistrarIPtr mRegistrar;
 };
 
-//XXX Queueable operation
 void RegistrarI::getAllBindings_async(
         const AMD_Registrar_getAllBindingsPtr& cb,
         const Ice::Current&)
@@ -308,7 +305,6 @@ private:
     RegistrarIPtr mRegistrar;
 };
 
-//XXX Queueable Operation
 void RegistrarI::getAORBindings_async(
         const AMD_Registrar_getAORBindingsPtr& cb,
         const std::string& aor,

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


-- 
asterisk-scf/integration/sip.git



More information about the asterisk-scf-commits mailing list