[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
Thu Oct 6 13:41:49 CDT 2011


branch "master" has been updated
       via  f9c355bfc60299b4ef25d5375aa53aacc9fee9e8 (commit)
      from  9920aea9b6e4647f41f3464e605d282154c9f9b9 (commit)

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


- Log -----------------------------------------------------------------
commit f9c355bfc60299b4ef25d5375aa53aacc9fee9e8
Author: Mark Michelson <mmichelson at digium.com>
Date:   Thu Oct 6 13:41:27 2011 -0500

    Fix 64 bit builds where size_t and int are different sizes.

diff --git a/src/SipClientRegistration.cpp b/src/SipClientRegistration.cpp
index a4e03d5..9aee763 100644
--- a/src/SipClientRegistration.cpp
+++ b/src/SipClientRegistration.cpp
@@ -15,6 +15,7 @@
  */
 
 #include "SipClientRegistration.h"
+#include <boost/numeric/conversion/cast.hpp>
 
 using namespace AsteriskSCF::System::Logging;
 
@@ -212,7 +213,7 @@ void SipRegistrationClient::createPJSIPRegistration(
             &serverURL,
             &fromURL,
             &toURL,
-            pjContacts.size(),
+            boost::numeric_cast<int>(pjContacts.size()),
             &pjContacts.front(),
             confItem->defaultExpiration
             );
@@ -289,7 +290,7 @@ void SipRegistrationClient::sendRegister()
     std::vector<pj_str_t> contacts;
     std::transform(mContacts.begin(), mContacts.end(), std::back_inserter(contacts), MakeContact(mReg));
 
-    pjsip_regc_update_contact(mReg, contacts.size(), &contacts.front());
+    pjsip_regc_update_contact(mReg, boost::numeric_cast<int>(contacts.size()), &contacts.front());
 
     pjsip_tx_data *tdata;
     pjsip_regc_register(mReg, PJ_TRUE, &tdata);
@@ -391,7 +392,7 @@ void SipRegistrationClient::authenticate(pjsip_rx_data *rdata)
             }
             if (creds.size() != 0)
             {
-                pjsip_regc_set_credentials(mReg, creds.size(), &creds.front());
+                pjsip_regc_set_credentials(mReg, boost::numeric_cast<int>(creds.size()), &creds.front());
                 sendRegister();
             }
             return;

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


-- 
asterisk-scf/release/sip.git



More information about the asterisk-scf-commits mailing list