(Auto)update libjingle 64585415-> 64594651
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5870 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -726,16 +726,9 @@ class JsepTestClient
|
|||||||
ice_server.uri = "stun:stun.l.google.com:19302";
|
ice_server.uri = "stun:stun.l.google.com:19302";
|
||||||
ice_servers.push_back(ice_server);
|
ice_servers.push_back(ice_server);
|
||||||
|
|
||||||
// TODO(jiayl): we should always pass a FakeIdentityService so that DTLS
|
FakeIdentityService* dtls_service =
|
||||||
// is enabled by default like in Chrome (issue 2838).
|
talk_base::SSLStreamAdapter::HaveDtlsSrtp() ?
|
||||||
FakeIdentityService* dtls_service = NULL;
|
new FakeIdentityService() : NULL;
|
||||||
bool dtls;
|
|
||||||
if (FindConstraint(constraints,
|
|
||||||
MediaConstraintsInterface::kEnableDtlsSrtp,
|
|
||||||
&dtls,
|
|
||||||
NULL) && dtls) {
|
|
||||||
dtls_service = new FakeIdentityService();
|
|
||||||
}
|
|
||||||
return peer_connection_factory()->CreatePeerConnection(
|
return peer_connection_factory()->CreatePeerConnection(
|
||||||
ice_servers, constraints, factory, dtls_service, this);
|
ice_servers, constraints, factory, dtls_service, this);
|
||||||
}
|
}
|
||||||
@ -1318,9 +1311,15 @@ TEST_F(JsepPeerConnectionP2PTestClient, RegisterDataChannelObserver) {
|
|||||||
// This test sets up a call between two parties with audio, video and but only
|
// This test sets up a call between two parties with audio, video and but only
|
||||||
// the initiating client support data.
|
// the initiating client support data.
|
||||||
TEST_F(JsepPeerConnectionP2PTestClient, LocalP2PTestReceiverDoesntSupportData) {
|
TEST_F(JsepPeerConnectionP2PTestClient, LocalP2PTestReceiverDoesntSupportData) {
|
||||||
FakeConstraints setup_constraints;
|
FakeConstraints setup_constraints_1;
|
||||||
setup_constraints.SetAllowRtpDataChannels();
|
setup_constraints_1.SetAllowRtpDataChannels();
|
||||||
ASSERT_TRUE(CreateTestClients(&setup_constraints, NULL));
|
// Must disable DTLS to make negotiation succeed.
|
||||||
|
setup_constraints_1.SetMandatory(
|
||||||
|
MediaConstraintsInterface::kEnableDtlsSrtp, false);
|
||||||
|
FakeConstraints setup_constraints_2;
|
||||||
|
setup_constraints_2.SetMandatory(
|
||||||
|
MediaConstraintsInterface::kEnableDtlsSrtp, false);
|
||||||
|
ASSERT_TRUE(CreateTestClients(&setup_constraints_1, &setup_constraints_2));
|
||||||
initializing_client()->CreateDataChannel();
|
initializing_client()->CreateDataChannel();
|
||||||
LocalP2PTest();
|
LocalP2PTest();
|
||||||
EXPECT_TRUE(initializing_client()->data_channel() != NULL);
|
EXPECT_TRUE(initializing_client()->data_channel() != NULL);
|
||||||
|
@ -259,8 +259,9 @@ class PeerConnectionInterfaceTest : public testing::Test {
|
|||||||
|
|
||||||
port_allocator_factory_ = FakePortAllocatorFactory::Create();
|
port_allocator_factory_ = FakePortAllocatorFactory::Create();
|
||||||
|
|
||||||
// TODO(jiayl): we should always pass a FakeIdentityService so that DTLS
|
// DTLS does not work in a loopback call, so is disabled for most of the
|
||||||
// is enabled by default like in Chrome (issue 2838).
|
// tests in this file. We only create a FakeIdentityService if the test
|
||||||
|
// explicitly sets the constraint.
|
||||||
FakeIdentityService* dtls_service = NULL;
|
FakeIdentityService* dtls_service = NULL;
|
||||||
bool dtls;
|
bool dtls;
|
||||||
if (FindConstraint(constraints,
|
if (FindConstraint(constraints,
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "talk/app/webrtc/fakeportallocatorfactory.h"
|
#include "talk/app/webrtc/fakeportallocatorfactory.h"
|
||||||
|
#include "talk/app/webrtc/test/fakedtlsidentityservice.h"
|
||||||
#include "talk/app/webrtc/test/fakeperiodicvideocapturer.h"
|
#include "talk/app/webrtc/test/fakeperiodicvideocapturer.h"
|
||||||
#include "talk/app/webrtc/test/mockpeerconnectionobservers.h"
|
#include "talk/app/webrtc/test/mockpeerconnectionobservers.h"
|
||||||
#include "talk/app/webrtc/test/peerconnectiontestwrapper.h"
|
#include "talk/app/webrtc/test/peerconnectiontestwrapper.h"
|
||||||
@ -93,8 +94,11 @@ bool PeerConnectionTestWrapper::CreatePc(
|
|||||||
webrtc::PeerConnectionInterface::IceServer ice_server;
|
webrtc::PeerConnectionInterface::IceServer ice_server;
|
||||||
ice_server.uri = "stun:stun.l.google.com:19302";
|
ice_server.uri = "stun:stun.l.google.com:19302";
|
||||||
ice_servers.push_back(ice_server);
|
ice_servers.push_back(ice_server);
|
||||||
|
FakeIdentityService* dtls_service =
|
||||||
|
talk_base::SSLStreamAdapter::HaveDtlsSrtp() ?
|
||||||
|
new FakeIdentityService() : NULL;
|
||||||
peer_connection_ = peer_connection_factory_->CreatePeerConnection(
|
peer_connection_ = peer_connection_factory_->CreatePeerConnection(
|
||||||
ice_servers, constraints, allocator_factory_.get(), NULL, this);
|
ice_servers, constraints, allocator_factory_.get(), dtls_service, this);
|
||||||
|
|
||||||
return peer_connection_.get() != NULL;
|
return peer_connection_.get() != NULL;
|
||||||
}
|
}
|
||||||
|
@ -882,9 +882,32 @@ bool WebRtcSession::ProcessIceMessage(const IceCandidateInterface* candidate) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!local_description() || !remote_description()) {
|
cricket::TransportProxy* transport_proxy = NULL;
|
||||||
LOG(LS_INFO) << "ProcessIceMessage: Remote description not set, "
|
if (remote_description()) {
|
||||||
<< "save the candidate for later use.";
|
size_t mediacontent_index =
|
||||||
|
static_cast<size_t>(candidate->sdp_mline_index());
|
||||||
|
size_t remote_content_size =
|
||||||
|
BaseSession::remote_description()->contents().size();
|
||||||
|
if (mediacontent_index >= remote_content_size) {
|
||||||
|
LOG(LS_ERROR)
|
||||||
|
<< "ProcessIceMessage: Invalid candidate media index.";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
cricket::ContentInfo content =
|
||||||
|
BaseSession::remote_description()->contents()[mediacontent_index];
|
||||||
|
transport_proxy = GetTransportProxy(content.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
// We need to check the local/remote description for the Transport instead of
|
||||||
|
// the session, because a new Transport added during renegotiation may have
|
||||||
|
// them unset while the session has them set from the previou negotiation. Not
|
||||||
|
// doing so may trigger the auto generation of transport description and mess
|
||||||
|
// up DTLS identity information, ICE credential, etc.
|
||||||
|
if (!transport_proxy || !(transport_proxy->local_description_set() &&
|
||||||
|
transport_proxy->remote_description_set())) {
|
||||||
|
LOG(LS_INFO) << "ProcessIceMessage: Local/Remote description not set "
|
||||||
|
<< "on the Transport, save the candidate for later use.";
|
||||||
saved_candidates_.push_back(
|
saved_candidates_.push_back(
|
||||||
new JsepIceCandidate(candidate->sdp_mid(), candidate->sdp_mline_index(),
|
new JsepIceCandidate(candidate->sdp_mid(), candidate->sdp_mline_index(),
|
||||||
candidate->candidate()));
|
candidate->candidate()));
|
||||||
|
8
talk/commit_message.txt
Executable file
8
talk/commit_message.txt
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
Change 64504440 updated.
|
||||||
|
Starting METADATA Presubmit checks ...
|
||||||
|
Spawned CheckCopyright (//depot/METADATA)
|
||||||
|
Success: CheckCopyright (5.25 us)
|
||||||
|
Presubmit checks finished with:
|
||||||
|
0 errors; 0 warnings; 0 notices.
|
||||||
|
Change 64504440 updated.
|
||||||
|
Reverting any unchanged files.
|
@ -156,14 +156,15 @@ void DtlsTransportChannelWrapper::Reset() {
|
|||||||
|
|
||||||
bool DtlsTransportChannelWrapper::SetLocalIdentity(
|
bool DtlsTransportChannelWrapper::SetLocalIdentity(
|
||||||
talk_base::SSLIdentity* identity) {
|
talk_base::SSLIdentity* identity) {
|
||||||
if (dtls_state_ == STATE_OPEN && identity == local_identity_) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO(ekr@rtfm.com): Forbid this if Connect() has been called.
|
|
||||||
if (dtls_state_ != STATE_NONE) {
|
if (dtls_state_ != STATE_NONE) {
|
||||||
LOG_J(LS_ERROR, this) << "Can't set DTLS local identity in this state";
|
if (identity == local_identity_) {
|
||||||
return false;
|
// This may happen during renegotiation.
|
||||||
|
LOG_J(LS_INFO, this) << "Ignoring identical DTLS identity";
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
LOG_J(LS_ERROR, this) << "Can't change DTLS local identity in this state";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (identity) {
|
if (identity) {
|
||||||
|
@ -284,9 +284,12 @@ bool TransportProxy::SetLocalTransportDescription(
|
|||||||
if (action == CA_ANSWER) {
|
if (action == CA_ANSWER) {
|
||||||
CompleteNegotiation();
|
CompleteNegotiation();
|
||||||
}
|
}
|
||||||
return transport_->get()->SetLocalTransportDescription(description,
|
bool result = transport_->get()->SetLocalTransportDescription(description,
|
||||||
action,
|
action,
|
||||||
error_desc);
|
error_desc);
|
||||||
|
if (result)
|
||||||
|
local_description_set_ = true;
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TransportProxy::SetRemoteTransportDescription(
|
bool TransportProxy::SetRemoteTransportDescription(
|
||||||
@ -297,9 +300,12 @@ bool TransportProxy::SetRemoteTransportDescription(
|
|||||||
if (action == CA_ANSWER) {
|
if (action == CA_ANSWER) {
|
||||||
CompleteNegotiation();
|
CompleteNegotiation();
|
||||||
}
|
}
|
||||||
return transport_->get()->SetRemoteTransportDescription(description,
|
bool result = transport_->get()->SetRemoteTransportDescription(description,
|
||||||
action,
|
action,
|
||||||
error_desc);
|
error_desc);
|
||||||
|
if (result)
|
||||||
|
remote_description_set_ = true;
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransportProxy::OnSignalingReady() {
|
void TransportProxy::OnSignalingReady() {
|
||||||
|
@ -102,7 +102,9 @@ class TransportProxy : public sigslot::has_slots<>,
|
|||||||
connecting_(false),
|
connecting_(false),
|
||||||
negotiated_(false),
|
negotiated_(false),
|
||||||
sent_candidates_(false),
|
sent_candidates_(false),
|
||||||
candidates_allocated_(false) {
|
candidates_allocated_(false),
|
||||||
|
local_description_set_(false),
|
||||||
|
remote_description_set_(false) {
|
||||||
transport_->get()->SignalCandidatesReady.connect(
|
transport_->get()->SignalCandidatesReady.connect(
|
||||||
this, &TransportProxy::OnTransportCandidatesReady);
|
this, &TransportProxy::OnTransportCandidatesReady);
|
||||||
}
|
}
|
||||||
@ -165,6 +167,13 @@ class TransportProxy : public sigslot::has_slots<>,
|
|||||||
SignalCandidatesReady(this, candidates);
|
SignalCandidatesReady(this, candidates);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool local_description_set() const {
|
||||||
|
return local_description_set_;
|
||||||
|
}
|
||||||
|
bool remote_description_set() const {
|
||||||
|
return remote_description_set_;
|
||||||
|
}
|
||||||
|
|
||||||
// Handles sending of ready candidates and receiving of remote candidates.
|
// Handles sending of ready candidates and receiving of remote candidates.
|
||||||
sigslot::signal2<TransportProxy*,
|
sigslot::signal2<TransportProxy*,
|
||||||
const std::vector<Candidate>&> SignalCandidatesReady;
|
const std::vector<Candidate>&> SignalCandidatesReady;
|
||||||
@ -196,6 +205,8 @@ class TransportProxy : public sigslot::has_slots<>,
|
|||||||
Candidates sent_candidates_;
|
Candidates sent_candidates_;
|
||||||
Candidates unsent_candidates_;
|
Candidates unsent_candidates_;
|
||||||
bool candidates_allocated_;
|
bool candidates_allocated_;
|
||||||
|
bool local_description_set_;
|
||||||
|
bool remote_description_set_;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::map<std::string, TransportProxy*> TransportMap;
|
typedef std::map<std::string, TransportProxy*> TransportMap;
|
||||||
|
Reference in New Issue
Block a user