diff --git a/p2p/base/connection.cc b/p2p/base/connection.cc index 8afd7192cc..b081d994ce 100644 --- a/p2p/base/connection.cc +++ b/p2p/base/connection.cc @@ -739,8 +739,7 @@ void Connection::SendStunBindingResponse(const StunMessage* message) { RTC_LOG(LS_ERROR) << "GOOG_DELTA consumer did not return ack!"; } } else { - RTC_LOG(LS_WARNING) << "Ignore GOOG_DELTA" - << " len: " << delta->length() + RTC_LOG(LS_WARNING) << "Ignore GOOG_DELTA" << " len: " << delta->length() << " answer_goog_delta = " << field_trials_->answer_goog_delta << " goog_delta_consumer_ = " diff --git a/p2p/base/ice_transport_internal.h b/p2p/base/ice_transport_internal.h index 1d7bd89a43..851dbaf2f5 100644 --- a/p2p/base/ice_transport_internal.h +++ b/p2p/base/ice_transport_internal.h @@ -400,9 +400,7 @@ class RTC_EXPORT IceTransportInternal : public rtc::PacketTransportInternal { } protected: - void SendGatheringStateEvent() { - gathering_state_callback_list_.Send(this); - } + void SendGatheringStateEvent() { gathering_state_callback_list_.Send(this); } webrtc::CallbackListlast_data_received() >= last_data_received_ms_); - last_data_received_ms_ = - std::max(last_data_received_ms_, connection->last_data_received()); + // Let the client know of an incoming packet + packets_received_++; + bytes_received_ += packet.payload().size(); + RTC_DCHECK(connection->last_data_received() >= last_data_received_ms_); + last_data_received_ms_ = + std::max(last_data_received_ms_, connection->last_data_received()); - NotifyPacketReceived(packet); + NotifyPacketReceived(packet); - // May need to switch the sending connection based on the receiving media - // path if this is the controlled side. - if (ice_role_ == ICEROLE_CONTROLLED && connection != selected_connection_) { - ice_controller_->OnImmediateSwitchRequest(IceSwitchReason::DATA_RECEIVED, - connection); - } + // May need to switch the sending connection based on the receiving media + // path if this is the controlled side. + if (ice_role_ == ICEROLE_CONTROLLED && connection != selected_connection_) { + ice_controller_->OnImmediateSwitchRequest(IceSwitchReason::DATA_RECEIVED, + connection); + } } void P2PTransportChannel::OnSentPacket(const rtc::SentPacket& sent_packet) { diff --git a/p2p/base/p2p_transport_channel_unittest.cc b/p2p/base/p2p_transport_channel_unittest.cc index b6fc5d0baa..04c0641150 100644 --- a/p2p/base/p2p_transport_channel_unittest.cc +++ b/p2p/base/p2p_transport_channel_unittest.cc @@ -1211,17 +1211,17 @@ const P2PTransportChannelMatrixTest::Result* #define P2P_TEST(x, y) P2P_TEST_DECLARATION(x, y, /* empty argument */) -#define P2P_TEST_SET(x) \ - P2P_TEST(x, OPEN) \ - P2P_TEST(x, NAT_FULL_CONE) \ - P2P_TEST(x, NAT_ADDR_RESTRICTED) \ - P2P_TEST(x, NAT_PORT_RESTRICTED) \ - P2P_TEST(x, NAT_SYMMETRIC) \ - P2P_TEST(x, NAT_DOUBLE_CONE) \ - P2P_TEST(x, NAT_SYMMETRIC_THEN_CONE) \ - P2P_TEST(x, BLOCK_UDP) \ - P2P_TEST(x, BLOCK_UDP_AND_INCOMING_TCP) \ - P2P_TEST(x, BLOCK_ALL_BUT_OUTGOING_HTTP) \ +#define P2P_TEST_SET(x) \ + P2P_TEST(x, OPEN) \ + P2P_TEST(x, NAT_FULL_CONE) \ + P2P_TEST(x, NAT_ADDR_RESTRICTED) \ + P2P_TEST(x, NAT_PORT_RESTRICTED) \ + P2P_TEST(x, NAT_SYMMETRIC) \ + P2P_TEST(x, NAT_DOUBLE_CONE) \ + P2P_TEST(x, NAT_SYMMETRIC_THEN_CONE) \ + P2P_TEST(x, BLOCK_UDP) \ + P2P_TEST(x, BLOCK_UDP_AND_INCOMING_TCP) \ + P2P_TEST(x, BLOCK_ALL_BUT_OUTGOING_HTTP) P2P_TEST_SET(OPEN) P2P_TEST_SET(NAT_FULL_CONE)