Index: webrtc/p2p/base/transportcontroller.cc |
diff --git a/webrtc/p2p/base/transportcontroller.cc b/webrtc/p2p/base/transportcontroller.cc |
index 4b24b1990d205a1ae12ec6cf87015ee50cf17822..de8434c83adac511e1e67c1e939719dbc443ec4f 100644 |
--- a/webrtc/p2p/base/transportcontroller.cc |
+++ b/webrtc/p2p/base/transportcontroller.cc |
@@ -112,6 +112,8 @@ bool TransportController::SetLocalCertificate( |
bool TransportController::GetLocalCertificate( |
const std::string& transport_name, |
rtc::scoped_refptr<rtc::RTCCertificate>* certificate) const { |
+ if (network_thread_->IsCurrent()) |
+ return GetLocalCertificate_n(transport_name, certificate); |
return network_thread_->Invoke<bool>( |
RTC_FROM_HERE, rtc::Bind(&TransportController::GetLocalCertificate_n, |
this, transport_name, certificate)); |
@@ -120,6 +122,8 @@ bool TransportController::GetLocalCertificate( |
std::unique_ptr<rtc::SSLCertificate> |
TransportController::GetRemoteSSLCertificate( |
const std::string& transport_name) const { |
+ if (network_thread_->IsCurrent()) |
+ return GetRemoteSSLCertificate_n(transport_name); |
pthatcher1
2016/12/15 23:19:00
{}, please.
Throughout the file.
hbos
2016/12/16 10:38:02
Done.
|
return network_thread_->Invoke<std::unique_ptr<rtc::SSLCertificate>>( |
RTC_FROM_HERE, rtc::Bind(&TransportController::GetRemoteSSLCertificate_n, |
this, transport_name)); |
@@ -177,6 +181,8 @@ bool TransportController::ReadyForRemoteCandidates( |
bool TransportController::GetStats(const std::string& transport_name, |
TransportStats* stats) { |
+ if (network_thread_->IsCurrent()) |
+ return GetStats_n(transport_name, stats); |
return network_thread_->Invoke<bool>( |
RTC_FROM_HERE, |
rtc::Bind(&TransportController::GetStats_n, this, transport_name, stats)); |