nsresult NrIceCtx::StartGathering() { int r = nr_ice_initialize(ctx_, &NrIceCtx::initialized_cb, this); if (r && r != R_WOULDBLOCK) { MOZ_MTLOG(PR_LOG_ERROR, "Couldn't gather ICE candidates for '" << name_ << "'"); return NS_ERROR_FAILURE; } SetState(ICE_CTX_GATHERING); return NS_OK; }
nsresult NrIceCtx::StartGathering() { MOZ_ASSERT(ctx_->state == ICE_CTX_INIT); if (ctx_->state != ICE_CTX_INIT) { MOZ_MTLOG(PR_LOG_ERROR, "ICE ctx in the wrong state for gathering: '" << name_ << "'"); SetState(ICE_CTX_FAILED); return NS_ERROR_FAILURE; } int r = nr_ice_initialize(ctx_, &NrIceCtx::initialized_cb, this); if (r && r != R_WOULDBLOCK) { MOZ_MTLOG(PR_LOG_ERROR, "Couldn't gather ICE candidates for '" << name_ << "'"); SetState(ICE_CTX_FAILED); return NS_ERROR_FAILURE; } SetState(ICE_CTX_GATHERING); return NS_OK; }
nsresult NrIceCtx::StartGathering() { ASSERT_ON_THREAD(sts_target_); MOZ_ASSERT(ctx_->state == ICE_CTX_INIT); if (ctx_->state != ICE_CTX_INIT) { MOZ_MTLOG(ML_ERROR, "ICE ctx in the wrong state for gathering: '" << name_ << "'"); SetConnectionState(ICE_CTX_FAILED); return NS_ERROR_FAILURE; } int r = nr_ice_initialize(ctx_, &NrIceCtx::initialized_cb, this); if (r && r != R_WOULDBLOCK) { MOZ_MTLOG(ML_ERROR, "Couldn't gather ICE candidates for '" << name_ << "'"); SetConnectionState(ICE_CTX_FAILED); return NS_ERROR_FAILURE; } SetGatheringState(ICE_CTX_GATHER_STARTED); return NS_OK; }