mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 05:40:42 +01:00

This is a follow up change to https://webrtc-review.googlesource.com/c/src/+/170628 and modifies code to only LOG if the route really has changed. Existing code will LOG like this, which is slightly annoying. Notice that the same route change is LOG:ed twice. 03-23 13:28:49.281 17986 18850 I rtp_transport_controller_send.cc: [1183:590] [18850] (line 253): Network route changed on transport audio: new_route = [ connected: 1 local: [ 2/4 Wifi turn: 0 ] remote: [ 2/3 Wifi turn: 0 ] packet_overhead_bytes: 32 ] 03-23 13:28:49.281 17986 18850 I rtp_transport_controller_send.cc: [1183:590] [18850] (line 278): old_route = [ connected: 1 local: [ 2/4 Wifi turn: 1 ] remote: [ 2/3 Wifi turn: 0 ] packet_overhead_bytes: 28 ] 03-23 13:28:49.281 17986 18850 I rtp_transport_controller_send.cc: [1183:591] [18850] (line 253): Network route changed on transport audio: new_route = [ connected: 1 local: [ 2/4 Wifi turn: 0 ] remote: [ 2/3 Wifi turn: 0 ] packet_overhead_bytes: 32 ] 03-23 13:28:49.282 17986 18850 I rtp_transport_controller_send.cc: [1183:591] [18850] (line 278): old_route = [ connected: 1 local: [ 2/4 Wifi turn: 0 ] remote: [ 2/3 Wifi turn: 0 ] packet_overhead_bytes: 32 ] The way this method is called twice with same argument is out of scope for this change. BUG: webrtc:11434 Change-Id: I052d089c59714513a09cbaed49f24c8f1300af58 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171460 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Björn Terelius <terelius@webrtc.org> Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30865}
24 lines
637 B
C++
24 lines
637 B
C++
/*
|
|
* Copyright 2004 The WebRTC Project Authors. All rights reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#include "rtc_base/network_route.h"
|
|
|
|
#include "rtc_base/gunit.h"
|
|
#include "test/gmock.h"
|
|
|
|
namespace rtc {
|
|
|
|
TEST(NetworkRoute, Equals) {
|
|
NetworkRoute r1;
|
|
NetworkRoute r2 = r1;
|
|
EXPECT_TRUE(r1 == r2);
|
|
}
|
|
|
|
} // namespace rtc
|