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}
This commit is contained in:
Qingsi Wang
2018-04-16 18:22:31 -07:00
committed by Commit Bot
parent 0676f224f8
commit 4ea53b356d
4 changed files with 8 additions and 4 deletions

View File

@ -62,7 +62,7 @@ int AsyncUDPSocket::Send(const void *pv, size_t cb,
const rtc::PacketOptions& options) {
rtc::SentPacket sent_packet(options.packet_id, rtc::TimeMillis(),
options.info_signaled_after_sent);
CopySocketInformationToPacketInfo(cb, *this, &sent_packet.info);
CopySocketInformationToPacketInfo(cb, *this, false, &sent_packet.info);
int ret = socket_->Send(pv, cb);
SignalSentPacket(this, sent_packet);
return ret;
@ -73,7 +73,7 @@ int AsyncUDPSocket::SendTo(const void *pv, size_t cb,
const rtc::PacketOptions& options) {
rtc::SentPacket sent_packet(options.packet_id, rtc::TimeMillis(),
options.info_signaled_after_sent);
CopySocketInformationToPacketInfo(cb, *this, &sent_packet.info);
CopySocketInformationToPacketInfo(cb, *this, true, &sent_packet.info);
sent_packet.info.remote_socket_address = addr;
int ret = socket_->SendTo(pv, cb, addr);
SignalSentPacket(this, sent_packet);