Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: webrtc/p2p/base/stunrequest.cc

Issue 2015773002: Changing STUN request log message to "verbose". (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 } 214 }
215 215
216 tstamp_ = rtc::TimeMillis(); 216 tstamp_ = rtc::TimeMillis();
217 217
218 rtc::ByteBufferWriter buf; 218 rtc::ByteBufferWriter buf;
219 msg_->Write(&buf); 219 msg_->Write(&buf);
220 manager_->SignalSendPacket(buf.Data(), buf.Length(), this); 220 manager_->SignalSendPacket(buf.Data(), buf.Length(), this);
221 221
222 OnSent(); 222 OnSent();
223 manager_->thread_->PostDelayed(resend_delay(), this, MSG_STUN_SEND, NULL); 223 manager_->thread_->PostDelayed(resend_delay(), this, MSG_STUN_SEND, NULL);
224 LOG(LS_INFO) << "Sent STUN request " << count_
225 << "; resend delay = " << resend_delay();
226 } 224 }
227 225
228 void StunRequest::OnSent() { 226 void StunRequest::OnSent() {
229 count_ += 1; 227 count_ += 1;
230 if (count_ == MAX_SENDS) 228 if (count_ == MAX_SENDS) {
231 timeout_ = true; 229 timeout_ = true;
230 }
231 LOG(LS_VERBOSE) << "Sent STUN request " << count_
232 << "; resend delay = " << resend_delay();
232 } 233 }
233 234
234 int StunRequest::resend_delay() { 235 int StunRequest::resend_delay() {
235 if (count_ == 0) { 236 if (count_ == 0) {
236 return 0; 237 return 0;
237 } 238 }
238 return DELAY_UNIT * std::min(1 << (count_-1), DELAY_MAX_FACTOR); 239 return DELAY_UNIT * std::min(1 << (count_-1), DELAY_MAX_FACTOR);
239 } 240 }
240 241
241 } // namespace cricket 242 } // namespace cricket
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698