mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-03 20:49:27 +00:00
Bug 1290948 - Part 8: Don't cause ICE to fail if there's no streams to establish. r+drno r=drno
MozReview-Commit-ID: 4wxlK9w3sL6 --HG-- extra : rebase_source : 06a01ef64beb1352cee503349a287a511de50053
This commit is contained in:
parent
f7f959c4f1
commit
b2254c16eb
@ -1043,8 +1043,21 @@ nsresult NrIceCtx::ParseGlobalAttributes(std::vector<std::string> attrs) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool NrIceCtx::HasStreamsToConnect() const {
|
||||
for (auto& stream : streams_) {
|
||||
if (stream && stream->state() != NrIceMediaStream::ICE_CLOSED) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
nsresult NrIceCtx::StartChecks(bool offerer) {
|
||||
int r;
|
||||
if (!HasStreamsToConnect()) {
|
||||
// Nothing to do
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
offerer_ = offerer;
|
||||
ice_start_time_ = TimeStamp::Now();
|
||||
|
@ -272,6 +272,8 @@ class NrIceCtx {
|
||||
return streams_.size();
|
||||
}
|
||||
|
||||
bool HasStreamsToConnect() const;
|
||||
|
||||
// The name of the ctx
|
||||
const std::string& name() const { return name_; }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user