summaryrefslogtreecommitdiff
path: root/p2p
diff options
context:
space:
mode:
authorbuildbot@webrtc.org <buildbot@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-04-09 06:06:38 +0000
committerbuildbot@webrtc.org <buildbot@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-04-09 06:06:38 +0000
commitf72f5a64fe04356b56ddfb84c6ed488d61ced7c4 (patch)
tree2989edcd392ccfeedd8223e68ac9e3285a07ade9 /p2p
parentc80268d886e47d35d31cb604042ecf52da9b2bc1 (diff)
downloadtalk-f72f5a64fe04356b56ddfb84c6ed488d61ced7c4.tar.gz
(Auto)update libjingle 64585415-> 64594651
git-svn-id: http://webrtc.googlecode.com/svn/trunk/talk@5870 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'p2p')
-rw-r--r--p2p/base/dtlstransportchannel.cc15
-rw-r--r--p2p/base/session.cc18
-rw-r--r--p2p/base/session.h13
3 files changed, 32 insertions, 14 deletions
diff --git a/p2p/base/dtlstransportchannel.cc b/p2p/base/dtlstransportchannel.cc
index 30cd80e..318ba94 100644
--- a/p2p/base/dtlstransportchannel.cc
+++ b/p2p/base/dtlstransportchannel.cc
@@ -156,14 +156,15 @@ void DtlsTransportChannelWrapper::Reset() {
bool DtlsTransportChannelWrapper::SetLocalIdentity(
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) {
- LOG_J(LS_ERROR, this) << "Can't set DTLS local identity in this state";
- return false;
+ if (identity == local_identity_) {
+ // 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) {
diff --git a/p2p/base/session.cc b/p2p/base/session.cc
index 3520984..a48f3cb 100644
--- a/p2p/base/session.cc
+++ b/p2p/base/session.cc
@@ -284,9 +284,12 @@ bool TransportProxy::SetLocalTransportDescription(
if (action == CA_ANSWER) {
CompleteNegotiation();
}
- return transport_->get()->SetLocalTransportDescription(description,
- action,
- error_desc);
+ bool result = transport_->get()->SetLocalTransportDescription(description,
+ action,
+ error_desc);
+ if (result)
+ local_description_set_ = true;
+ return result;
}
bool TransportProxy::SetRemoteTransportDescription(
@@ -297,9 +300,12 @@ bool TransportProxy::SetRemoteTransportDescription(
if (action == CA_ANSWER) {
CompleteNegotiation();
}
- return transport_->get()->SetRemoteTransportDescription(description,
- action,
- error_desc);
+ bool result = transport_->get()->SetRemoteTransportDescription(description,
+ action,
+ error_desc);
+ if (result)
+ remote_description_set_ = true;
+ return result;
}
void TransportProxy::OnSignalingReady() {
diff --git a/p2p/base/session.h b/p2p/base/session.h
index 826baaa..504187f 100644
--- a/p2p/base/session.h
+++ b/p2p/base/session.h
@@ -102,7 +102,9 @@ class TransportProxy : public sigslot::has_slots<>,
connecting_(false),
negotiated_(false),
sent_candidates_(false),
- candidates_allocated_(false) {
+ candidates_allocated_(false),
+ local_description_set_(false),
+ remote_description_set_(false) {
transport_->get()->SignalCandidatesReady.connect(
this, &TransportProxy::OnTransportCandidatesReady);
}
@@ -165,6 +167,13 @@ class TransportProxy : public sigslot::has_slots<>,
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.
sigslot::signal2<TransportProxy*,
const std::vector<Candidate>&> SignalCandidatesReady;
@@ -196,6 +205,8 @@ class TransportProxy : public sigslot::has_slots<>,
Candidates sent_candidates_;
Candidates unsent_candidates_;
bool candidates_allocated_;
+ bool local_description_set_;
+ bool remote_description_set_;
};
typedef std::map<std::string, TransportProxy*> TransportMap;