From fafae11bfc4c7d1f8f02e708b0187fb48f7b8810 Mon Sep 17 00:00:00 2001 From: Bjorn Terelius Date: Wed, 5 Dec 2018 21:06:17 +0100 Subject: [PATCH] Allow parsing RTC event logs without a transaction ID. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: webrtc:9972 Change-Id: I01d60671d249adbd55f25c8f49f205b18787cbf4 Reviewed-on: https://webrtc-review.googlesource.com/c/113304 Reviewed-by: Zach Stein Commit-Queue: Björn Terelius Cr-Commit-Position: refs/heads/master@{#25914} --- logging/rtc_event_log/rtc_event_log_parser_new.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/logging/rtc_event_log/rtc_event_log_parser_new.cc b/logging/rtc_event_log/rtc_event_log_parser_new.cc index 7ae7fefe58..7926f3bf9c 100644 --- a/logging/rtc_event_log/rtc_event_log_parser_new.cc +++ b/logging/rtc_event_log/rtc_event_log_parser_new.cc @@ -2428,8 +2428,10 @@ void ParsedRtcEventLogNew::StoreIceCandidateEvent( ice_event.type = GetRuntimeIceCandidatePairEventType(proto.event_type()); RTC_CHECK(proto.has_candidate_pair_id()); ice_event.candidate_pair_id = proto.candidate_pair_id(); - RTC_CHECK(proto.has_transaction_id()); - ice_event.transaction_id = proto.transaction_id(); + // TODO(zstein): Make the transaction_id field required once all old versions + // of the log (which don't have the field) are obsolete. + if (proto.has_transaction_id()) + ice_event.transaction_id = proto.transaction_id(); ice_candidate_pair_events_.push_back(ice_event);