Files
platform-external-webrtc/logging/rtc_event_log/icelogger.cc
Erik Språng 286ee0123e Revert "Add transaction id to CandidatePairEvents."
This reverts commit c308bdfa451ee2ceac7096b6777fcbf756f4091a.

Reason for revert: The msan bot has been consistently failing since this commit. See eg https://ci.chromium.org/p/webrtc/builders/luci.webrtc.ci/Linux%20MSan/16989

Original change's description:
> Add transaction id to CandidatePairEvents.
> 
> The transaction id is a randomly generated number used to link stun
> requests and responses (https://tools.ietf.org/html/rfc5389#section-6).
> Logging this will help us debug ICE network issues.
> 
> Bug: webrtc:9972
> Change-Id: I93167cb119aad99156e8727b6e4eeeff5198f924
> Reviewed-on: https://webrtc-review.googlesource.com/c/109720
> Commit-Queue: Zach Stein <zstein@webrtc.org>
> Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
> Reviewed-by: Elad Alon <eladalon@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25848}

TBR=eladalon@webrtc.org,terelius@webrtc.org,zstein@webrtc.org,qingsi@webrtc.org,jeroendb@webrtc.org

Change-Id: Ib3b0a845f2300f4fcba2061650e17522735f08b3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9972
Reviewed-on: https://webrtc-review.googlesource.com/c/112581
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25852}
2018-11-30 09:28:25 +00:00

51 lines
1.6 KiB
C++

/*
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "logging/rtc_event_log/icelogger.h"
#include "absl/memory/memory.h"
#include "logging/rtc_event_log/rtc_event_log.h"
namespace webrtc {
IceEventLog::IceEventLog() {}
IceEventLog::~IceEventLog() {}
void IceEventLog::LogCandidatePairConfig(
IceCandidatePairConfigType type,
uint32_t candidate_pair_id,
const IceCandidatePairDescription& candidate_pair_desc) {
if (event_log_ == nullptr) {
return;
}
candidate_pair_desc_by_id_[candidate_pair_id] = candidate_pair_desc;
event_log_->Log(absl::make_unique<RtcEventIceCandidatePairConfig>(
type, candidate_pair_id, candidate_pair_desc));
}
void IceEventLog::LogCandidatePairEvent(IceCandidatePairEventType type,
uint32_t candidate_pair_id) {
if (event_log_ == nullptr) {
return;
}
event_log_->Log(
absl::make_unique<RtcEventIceCandidatePair>(type, candidate_pair_id));
}
void IceEventLog::DumpCandidatePairDescriptionToMemoryAsConfigEvents() const {
for (const auto& desc_id_pair : candidate_pair_desc_by_id_) {
event_log_->Log(absl::make_unique<RtcEventIceCandidatePairConfig>(
IceCandidatePairConfigType::kUpdated, desc_id_pair.first,
desc_id_pair.second));
}
}
} // namespace webrtc