aboutsummaryrefslogtreecommitdiff
path: root/pc/rtc_stats_collector.cc
diff options
context:
space:
mode:
authorHarald Alvestrand <hta@webrtc.org>2019-07-31 07:16:45 -0400
committerCommit Bot <commit-bot@chromium.org>2019-07-31 13:19:08 +0000
commit928e7a3e79f34ad5d2748c9c06faa11f4f375490 (patch)
treee3f7058bf764b9241e44bb1b9854794e24c0a6de /pc/rtc_stats_collector.cc
parent97e015fa8e5a57a6fc6fcb9d727b6262048e30ea (diff)
downloadwebrtc-928e7a3e79f34ad5d2748c9c06faa11f4f375490.tar.gz
Make ID of datachannel stats not depend on dc.id
The ID of stats was based on the datachannel's "id" attribute, but that could change - it was -1 before ID allocation, and a number afterwards. This CL changes the stats ID to depend on a monotonically increasing counter for allocated datachannels. Bug: webrtc:10842 Change-Id: I3e0c5dc07df8a7a502396de06bbedc9f676994a0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147642 Reviewed-by: Henrik Boström <hbos@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28720}
Diffstat (limited to 'pc/rtc_stats_collector.cc')
-rw-r--r--pc/rtc_stats_collector.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/pc/rtc_stats_collector.cc b/pc/rtc_stats_collector.cc
index 55735c0b83..8336812081 100644
--- a/pc/rtc_stats_collector.cc
+++ b/pc/rtc_stats_collector.cc
@@ -1224,7 +1224,7 @@ void RTCStatsCollector::ProduceDataChannelStats_s(
pc_->sctp_data_channels()) {
std::unique_ptr<RTCDataChannelStats> data_channel_stats(
new RTCDataChannelStats(
- "RTCDataChannel_" + rtc::ToString(data_channel->id()),
+ "RTCDataChannel_" + rtc::ToString(data_channel->internal_id()),
timestamp_us));
data_channel_stats->label = data_channel->label();
data_channel_stats->protocol = data_channel->protocol();