Bug 906986 - Rework fix for Bug 1241690 to avoid reliance on NrIceCtx inside NrIceMediaStream. r=bwc, r=drno
authorMichael Froman <mfroman@mozilla.com>
Thu, 31 Mar 2016 09:24:17 -0500
changeset 330346 0786093c2c50c407c70a855f0880d17abe590316
parent 330345 a392a2f7b117b054be9ab85b283a58a926f09e62
child 330347 b752c6a3ed5abe6ac112701d0537724323a7c3a2
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbwc, drno
bugs906986, 1241690
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 906986 - Rework fix for Bug 1241690 to avoid reliance on NrIceCtx inside NrIceMediaStream. r=bwc, r=drno MozReview-Commit-ID: 1QCfbZUGdwM
media/mtransport/nricemediastream.cpp
--- a/media/mtransport/nricemediastream.cpp
+++ b/media/mtransport/nricemediastream.cpp
@@ -301,17 +301,17 @@ nsresult NrIceMediaStream::GetActivePair
 nsresult NrIceMediaStream::GetCandidatePairs(std::vector<NrIceCandidatePair>*
                                              out_pairs) const {
   MOZ_ASSERT(out_pairs);
   if (!stream_) {
     return NS_ERROR_NOT_AVAILABLE;
   }
 
   // If we haven't at least started checking then there is nothing to report
-  if (ctx_->connection_state() == NrIceCtx::ICE_CTX_INIT) {
+  if (ctx_->peer()->state != NR_ICE_PEER_STATE_PAIRED) {
     return NS_OK;
   }
 
   // Get the check_list on the peer stream (this is where the check_list
   // actually lives, not in stream_)
   nr_ice_media_stream* peer_stream;
   int r = nr_ice_peer_ctx_find_pstream(ctx_->peer(), stream_, &peer_stream);
   if (r != 0) {
@@ -485,17 +485,17 @@ nsresult NrIceMediaStream::GetLocalCandi
 
 nsresult NrIceMediaStream::GetRemoteCandidates(
     std::vector<NrIceCandidate>* candidates) const {
   if (!stream_) {
     return NS_ERROR_NOT_AVAILABLE;
   }
 
   // If we haven't at least started checking then there is nothing to report
-  if (ctx_->connection_state() == NrIceCtx::ICE_CTX_INIT) {
+  if (ctx_->peer()->state != NR_ICE_PEER_STATE_PAIRED) {
     return NS_OK;
   }
 
   nr_ice_media_stream* peer_stream;
   int r = nr_ice_peer_ctx_find_pstream(ctx_->peer(), stream_, &peer_stream);
   if (r != 0) {
     return NS_ERROR_FAILURE;
   }