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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Jul 20 16:52:00 CDT 2011


branch "master" has been updated
       via  e84d7465f1cad92a44e5bd5c1391910d3384014e (commit)
       via  f8d21b7aabcc6eb1eacb6f5c35c5bc8d63079ac8 (commit)
      from  af994c8365ccb27170e6fd1976c4974f40ade216 (commit)

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


- Log -----------------------------------------------------------------
commit e84d7465f1cad92a44e5bd5c1391910d3384014e
Author: Mark Michelson <mmichelson at digium.com>
Date:   Wed Jul 20 16:52:22 2011 -0500

    Use a more specific type in the numeric_limits use.

diff --git a/src/UDPTransport.cpp b/src/UDPTransport.cpp
index b95c276..8961f7c 100644
--- a/src/UDPTransport.cpp
+++ b/src/UDPTransport.cpp
@@ -68,7 +68,7 @@ UDPTransportPtr AsteriskSCF::PJMediaRTP::UDPTransport::createImpl(const PJMediaE
     // Now create some transport we can use to actually send or receive the media. The candidate ports increment by
     // two to allow "room" for both a control and a data port.
     //
-    for (unsigned port = minPort; port < maxPort && port <= numeric_limits<unsigned short>::max() ; port +=2)
+    for (unsigned port = minPort; port < maxPort && port <= numeric_limits<uint16_t>::max() ; port +=2)
     {
         pjmedia_transport* transport;
         pj_status_t result = pjmedia_transport_udp_create3(ep->endpoint(), addressFamily, "RTP", bindAddressPtr, 

commit f8d21b7aabcc6eb1eacb6f5c35c5bc8d63079ac8
Author: Mark Michelson <mmichelson at digium.com>
Date:   Wed Jul 20 16:51:25 2011 -0500

    Fix problems due to warnings:
    
    * Use an unsigned value in the for loop
    * Use numeric_limits class instead of USHRT_MAX

diff --git a/src/UDPTransport.cpp b/src/UDPTransport.cpp
index 4294c29..b95c276 100644
--- a/src/UDPTransport.cpp
+++ b/src/UDPTransport.cpp
@@ -20,6 +20,7 @@
 #include <pjmedia.h>
 #include <AsteriskSCF/System/ExceptionsIf.h>
 #include <Ice/Properties.h>
+#include <limits>
 
 using namespace AsteriskSCF::PJMediaRTP;
 using namespace AsteriskSCF::System::V1;
@@ -67,7 +68,7 @@ UDPTransportPtr AsteriskSCF::PJMediaRTP::UDPTransport::createImpl(const PJMediaE
     // Now create some transport we can use to actually send or receive the media. The candidate ports increment by
     // two to allow "room" for both a control and a data port.
     //
-    for (Ice::Int port = minPort; port < maxPort && port <= USHRT_MAX ; port +=2)
+    for (unsigned port = minPort; port < maxPort && port <= numeric_limits<unsigned short>::max() ; port +=2)
     {
         pjmedia_transport* transport;
         pj_status_t result = pjmedia_transport_udp_create3(ep->endpoint(), addressFamily, "RTP", bindAddressPtr, 

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


-- 
asterisk-scf/release/media_rtp_pjmedia.git



More information about the asterisk-scf-commits mailing list