From 5ae9f5ed6ca4d0983d945f9edf24696abba73f1a Mon Sep 17 00:00:00 2001 From: "mflodman@webrtc.org" Date: Mon, 7 Nov 2011 20:03:00 +0000 Subject: [PATCH] Adding logs in RTPSender::ReSendToNetwork. Review URL: http://webrtc-codereview.appspot.com/273001 git-svn-id: http://webrtc.googlecode.com/svn/trunk@896 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/modules/rtp_rtcp/source/rtp_sender.cc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/modules/rtp_rtcp/source/rtp_sender.cc b/src/modules/rtp_rtcp/source/rtp_sender.cc index 8e8db38660..f7ccbd0811 100644 --- a/src/modules/rtp_rtcp/source/rtp_sender.cc +++ b/src/modules/rtp_rtcp/source/rtp_sender.cc @@ -800,9 +800,9 @@ RTPSender::ReSendToNetwork(WebRtc_UWord16 packetID, { CriticalSectionScoped lock(_prevSentPacketsCritsect); + WebRtc_UWord16 seqNum = 0; if(_storeSentPackets) { - WebRtc_UWord16 seqNum = 0; if(_prevSentPacketsIndex) { seqNum = _prevSentPacketsSeqNum[_prevSentPacketsIndex-1]; @@ -842,15 +842,24 @@ RTPSender::ReSendToNetwork(WebRtc_UWord16 packetID, if(length > _maxPayloadLength || _ptrPrevSentPackets[index] == 0) { + WEBRTC_TRACE( + kTraceWarning, kTraceRtpRtcp, _id, + "Failed to resend seqNum %u: length = %d index = %d", + seqNum, length, index); return -1; } } else { + WEBRTC_TRACE(kTraceWarning, kTraceRtpRtcp, _id, + "No match for resending seqNum %u and packetId %u", + seqNum, packetID); return -1; } } if(length ==0) { + WEBRTC_TRACE(kTraceWarning, kTraceRtpRtcp, _id, + "Resend packet length == 0 for seqNum %u", seqNum); return -1; } @@ -884,6 +893,8 @@ RTPSender::ReSendToNetwork(WebRtc_UWord16 packetID, } return i; //bytes sent over network } + WEBRTC_TRACE(kTraceWarning, kTraceRtpRtcp, _id, + "Transport failed to resend packetID %u", packetID); return -1; }