Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(357)

Unified Diff: webrtc/p2p/client/basicportallocator.cc

Issue 1871693004: Fix AllocationSequence to handle the case when TurnPort stops using shared socket. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/client/basicportallocator.cc
diff --git a/webrtc/p2p/client/basicportallocator.cc b/webrtc/p2p/client/basicportallocator.cc
index 22abf33e93639d90b276ca9d6c5cc025fca3a6e0..ae79aea26872bdda92a7a83cbc66f6b1489b4873 100644
--- a/webrtc/p2p/client/basicportallocator.cc
+++ b/webrtc/p2p/client/basicportallocator.cc
@@ -1083,7 +1083,7 @@ void AllocationSequence::OnReadPacket(
for (std::vector<TurnPort*>::const_iterator it = turn_ports_.begin();
it != turn_ports_.end(); ++it) {
TurnPort* port = *it;
- if (port->server_address().address == remote_addr) {
+ if (port->SharedSocket() && port->server_address().address == remote_addr) {
honghaiz 2016/04/19 05:32:20 I think it is better to still let the TurnPort eat
Sergey Ulanov 2016/04/20 20:50:56 The packet will be passed to a stun port only when
honghaiz3 2016/04/22 01:49:02 It will be passed to the stun port because the con
port->HandleIncomingPacket(socket, data, size, remote_addr, packet_time);
turn_port_found = true;
break;
@@ -1097,6 +1097,7 @@ void AllocationSequence::OnReadPacket(
// the TURN server is also a STUN server.
if (!turn_port_found ||
stun_servers.find(remote_addr) != stun_servers.end()) {
+ RTC_DCHECK(udp_port_->SharedSocket());
udp_port_->HandleIncomingPacket(
socket, data, size, remote_addr, packet_time);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698