aboutsummaryrefslogtreecommitdiff
path: root/p2p
diff options
context:
space:
mode:
authorSebastian Jansson <srte@webrtc.org>2020-03-02 11:32:23 +0100
committerCommit Bot <commit-bot@chromium.org>2020-03-02 11:36:58 +0000
commitdb5d7e470fcbc625410c5646f95d37382da3e3b9 (patch)
treebda616a9270e40c4294ba3a8ad0331f2ff822d13 /p2p
parent61f74d91f823c9d600490ff8b3856ba2a520ec22 (diff)
downloadwebrtc-db5d7e470fcbc625410c5646f95d37382da3e3b9.tar.gz
Cleanup: Use common IP overhead definitions in test and prod code
This avoid duplication. As part of this moving the overhead calculation to the IP address class so it's easier to find and more natural to use. Bug: webrtc:9883 Change-Id: If4d865f445bc1a302572896932966ce30294e339 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169445 Commit-Queue: Sebastian Jansson <srte@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30657}
Diffstat (limited to 'p2p')
-rw-r--r--p2p/base/p2p_transport_channel.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/p2p/base/p2p_transport_channel.cc b/p2p/base/p2p_transport_channel.cc
index 4e18cd43cb..4e56d161ab 100644
--- a/p2p/base/p2p_transport_channel.cc
+++ b/p2p/base/p2p_transport_channel.cc
@@ -1682,8 +1682,7 @@ void P2PTransportChannel::SwitchSelectedConnection(Connection* conn,
selected_connection_->remote_candidate().network_id();
network_route_->last_sent_packet_id = last_sent_packet_id_;
network_route_->packet_overhead =
- GetIpOverhead(
- selected_connection_->local_candidate().address().family()) +
+ selected_connection_->local_candidate().address().ipaddr().overhead() +
GetProtocolOverhead(selected_connection_->local_candidate().protocol());
} else {
RTC_LOG(LS_INFO) << ToString() << ": No selected connection";