[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
Tue Jul 19 13:32:57 CDT 2011


branch "master" has been updated
       via  f3ac2038009f50b1ff84d203999dc79f2a0aea56 (commit)
      from  6577d75e59c8b2f4241103f48fd114da433c8597 (commit)

Summary of changes:
 src/PJSipRegistrarModule.cpp       |    4 ++--
 src/SipStateReplicatorListener.cpp |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)


- Log -----------------------------------------------------------------
commit f3ac2038009f50b1ff84d203999dc79f2a0aea56
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Tue Jul 19 13:32:51 2011 -0500

    Resolve compiler warnings about int/time_t conversions.

diff --git a/src/PJSipRegistrarModule.cpp b/src/PJSipRegistrarModule.cpp
index b01832a..c7cde7f 100644
--- a/src/PJSipRegistrarModule.cpp
+++ b/src/PJSipRegistrarModule.cpp
@@ -121,7 +121,7 @@ public:
     {
         mWrapper->mBinding->callid = mCallID;
         mWrapper->mBinding->cseq = mCSeq;
-        mWrapper->mBinding->expiration = time(NULL) + mExpiration;
+        mWrapper->mBinding->expiration = (int)time(NULL) + mExpiration;
         mWrapper->cancelRegistrationExpiration();
         lg(Debug) << "Renewing binding " << mWrapper->mBinding->contact << " for another " << mExpiration << " seconds.";
         mWrapper->scheduleRegistrationExpiration(mExpiration);
@@ -689,7 +689,7 @@ BindingWrapperPtr PJSipRegistrarModule::createNewBinding(pjsip_contact_hdr *cont
         << ", CSeq: " << cSeq
         << ", and Expires: " << expiration;
 
-    BindingPtr binding(new Binding(contactURIStr, callID, cSeq, time(NULL) + expiration));
+    BindingPtr binding(new Binding(contactURIStr, callID, cSeq, (int)time(NULL) + expiration));
     BindingWrapperPtr wrapper(new BindingWrapper(expiration, binding, this, mEndpoint, aor));
     //We could just return binding, but using wrapper here makes the compiler
     //not complain about an unused variable.
diff --git a/src/SipStateReplicatorListener.cpp b/src/SipStateReplicatorListener.cpp
index 784575b..d9c2290 100644
--- a/src/SipStateReplicatorListener.cpp
+++ b/src/SipStateReplicatorListener.cpp
@@ -74,7 +74,7 @@ public:
 
     BindingWrapperPtr createBindingWrapper(const std::string& aor, const BindingPtr& binding, const PJSipRegistrarModulePtr& regModule)
     {
-        int relativeExpiration = binding->expiration - time(NULL);
+        int relativeExpiration = binding->expiration - (int)time(NULL);
 
         BindingWrapperPtr wrapper(new BindingWrapper(
                     relativeExpiration,
@@ -198,7 +198,7 @@ public:
                 }
                 else
                 {
-                    (*bindingToUpdate)->updateBinding((*seqIter)->callid, (*seqIter)->cseq, (*seqIter)->expiration - time(NULL), regModule->getRegistrar()->getQueue());
+			(*bindingToUpdate)->updateBinding((*seqIter)->callid, (*seqIter)->cseq, (*seqIter)->expiration - (int)time(NULL), regModule->getRegistrar()->getQueue());
                 }
             }
             if (!newBindings.empty())

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


-- 
asterisk-scf/release/sip.git



More information about the asterisk-scf-commits mailing list