[asterisk-scf-commits] asterisk-scf/integration/media_rtp_pjmedia.git branch "ipv6" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed May 18 18:47:39 CDT 2011


branch "ipv6" has been updated
       via  9c40b81b78436cd3609150dd51dccbe7cb9db532 (commit)
      from  c9c0b0122f21bdea2abde40347be16b43f117da5 (commit)

Summary of changes:
 src/RTPSink.cpp         |    3 +++
 src/RTPSource.cpp       |    2 +-
 test/TestRTPpjmedia.cpp |    3 ++-
 3 files changed, 6 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit 9c40b81b78436cd3609150dd51dccbe7cb9db532
Author: Joshua Colp <jcolp at digium.com>
Date:   Wed May 18 20:49:03 2011 -0300

    Incorporate some review feedback, still need to javadocify some a bit in the header files.

diff --git a/src/RTPSink.cpp b/src/RTPSink.cpp
index babec1e..58ae1fe 100644
--- a/src/RTPSink.cpp
+++ b/src/RTPSink.cpp
@@ -212,6 +212,9 @@ std::string StreamSinkRTPImpl::getRemoteAddress(const Ice::Current&)
     if (transportInfo.src_rtp_name.addr.sa_family != PJ_AF_INET &&
 	transportInfo.src_rtp_name.addr.sa_family != PJ_AF_INET6)
     {
+	// If we have no remote address yet (we know because the default initialization
+	// for the above is neither PJ_AF_INET or PJ_AF_INET6) then return whatever
+	// remote address we have been told, heck, it could be blank!
 	return mImpl->mSinkStateItem->mRemoteAddress;
     }
 
diff --git a/src/RTPSource.cpp b/src/RTPSource.cpp
index e426c4f..7288bfe 100644
--- a/src/RTPSource.cpp
+++ b/src/RTPSource.cpp
@@ -266,7 +266,7 @@ void StreamSourceRTPImpl::setRemoteDetails(const string& address, Ice::Int port)
     pjmedia_transport_detach(mImpl->mSession->getTransport(), this);
 
     /* All ready... actually do it! */
-    status = pjmedia_transport_attach(mImpl->mSession->getTransport(), this, &addr, NULL, sizeof(pj_sockaddr), &receiveRTP, NULL);
+    status = pjmedia_transport_attach(mImpl->mSession->getTransport(), this, &addr, NULL, pj_sockaddr_get_len(&addr), &receiveRTP, NULL);
 
     if (status != PJ_SUCCESS)
     {
diff --git a/test/TestRTPpjmedia.cpp b/test/TestRTPpjmedia.cpp
index b2b1bef..810963e 100644
--- a/test/TestRTPpjmedia.cpp
+++ b/test/TestRTPpjmedia.cpp
@@ -1047,7 +1047,8 @@ BOOST_AUTO_TEST_CASE(ReceiveUnknownRTPPacket)
 }
 
 /**
- * Attempt to set a valid but address family invalid address on an RTP sink
+ * Attempt to set an IPv4 address on an IPv6 only sink OR try to set an IPv6 address
+ * on an IPv4 only sink.
  */
 BOOST_AUTO_TEST_CASE(SetInvalidAddressFamilyAddress)
 {

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


-- 
asterisk-scf/integration/media_rtp_pjmedia.git



More information about the asterisk-scf-commits mailing list