Chromium Code Reviews| Index: webrtc/p2p/base/turnport.cc |
| diff --git a/webrtc/p2p/base/turnport.cc b/webrtc/p2p/base/turnport.cc |
| index 3fdcac5f31b5804d094d8fe6e8a5891f7a8dd94e..fa2a0536786d81b5d450d5db128862331f8f1a8f 100644 |
| --- a/webrtc/p2p/base/turnport.cc |
| +++ b/webrtc/p2p/base/turnport.cc |
| @@ -918,6 +918,17 @@ void TurnPort::OnConnectionDestroyed(Connection* conn) { |
| DestroyEntry(conn->remote_candidate().address()); |
| } |
| +void TurnPort::OnCreatePermissionError(const rtc::SocketAddress address, |
| + int code) { |
| + Connection* c = GetConnection(address); |
| + if (c) { |
| + LOG_J(LS_ERROR, c) << "Received TURN CreatePermission error response, " |
| + << "code=" << code << "; killing connection."; |
| + c->set_state(Connection::STATE_FAILED); |
| + c->Destroy(); |
|
pthatcher
2015/11/24 17:56:47
Why does this need to be friend class?
|
| + } |
| +} |
| + |
| TurnAllocateRequest::TurnAllocateRequest(TurnPort* port) |
| : StunRequest(new TurnMessage()), |
| port_(port) { |
| @@ -1347,6 +1358,7 @@ void TurnEntry::OnCreatePermissionError(StunMessage* response, int code) { |
| } else { |
| // Send signal with error code. |
| port_->SignalCreatePermissionResult(port_, ext_addr_, code); |
| + port_->OnCreatePermissionError(ext_addr_, code); |
| } |
| } |