Prevent warning logs when signaling stats from connectionless sockets.
Signaling per-packet stats invokes GetRemoteAddress and a warning log is
output for each signal in SendTo for UDP sockets. This creates noise in
the debug log.
Bug: webrtc:9103
Change-Id: Ibf4667cf196aef971452f745bef3c02fb1dbf3d4
Reviewed-on: https://webrtc-review.googlesource.com/70364
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22911}
diff --git a/rtc_base/asyncpacketsocket.cc b/rtc_base/asyncpacketsocket.cc
index 104e511..e1b1eae 100644
--- a/rtc_base/asyncpacketsocket.cc
+++ b/rtc_base/asyncpacketsocket.cc
@@ -30,10 +30,13 @@
void CopySocketInformationToPacketInfo(size_t packet_size_bytes,
const AsyncPacketSocket& socket_from,
+ bool is_connectionless,
rtc::PacketInfo* info) {
info->packet_size_bytes = packet_size_bytes;
info->local_socket_address = socket_from.GetLocalAddress();
- info->remote_socket_address = socket_from.GetRemoteAddress();
+ if (!is_connectionless) {
+ info->remote_socket_address = socket_from.GetRemoteAddress();
+ }
}
}; // namespace rtc