Delete obsolete RtcEventLogOutputFile constructor

Followup to https://webrtc-review.googlesource.com/c/src/+/134460.

Bug: webrtc:6463
Change-Id: Ib6574b02b21fddc598c1f67c7e2b515f01d33204
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139887
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28206}
This commit is contained in:
Niels Möller
2019-06-03 15:25:20 +02:00
committed by Commit Bot
parent 12561e06ce
commit dec9f74b8d
5 changed files with 18 additions and 31 deletions

View File

@ -536,9 +536,8 @@ void PeerConnectionDelegateAdapter::OnRemoveTrack(
RTCLogError(@"Event logging already started.");
return NO;
}
int fd = open(filePath.UTF8String, O_WRONLY | O_CREAT | O_TRUNC,
S_IRUSR | S_IWUSR);
if (fd < 0) {
FILE *f = fopen(filePath.UTF8String, "wb");
if (!f) {
RTCLogError(@"Error opening file: %@. Error: %d", filePath, errno);
return NO;
}
@ -547,7 +546,7 @@ void PeerConnectionDelegateAdapter::OnRemoveTrack(
rtc::saturated_cast<size_t>(maxSizeInBytes);
_hasStartedRtcEventLog = _peerConnection->StartRtcEventLog(
absl::make_unique<webrtc::RtcEventLogOutputFile>(fd, max_size));
absl::make_unique<webrtc::RtcEventLogOutputFile>(f, max_size));
return _hasStartedRtcEventLog;
}