Index: talk/app/webrtc/webrtcsession.cc |
diff --git a/talk/app/webrtc/webrtcsession.cc b/talk/app/webrtc/webrtcsession.cc |
index 1fc2a37902740aeda83a8d3c3e58d90aa9d9117c..9da046219b1672d88b7ffc0e13da0857d4dde42d 100644 |
--- a/talk/app/webrtc/webrtcsession.cc |
+++ b/talk/app/webrtc/webrtcsession.cc |
@@ -2157,9 +2157,9 @@ void WebRtcSession::ReportNegotiatedCiphers( |
return; |
} |
- const std::string& srtp_cipher = stats.channel_stats[0].srtp_cipher; |
- int ssl_cipher = stats.channel_stats[0].ssl_cipher; |
- if (srtp_cipher.empty() && !ssl_cipher) { |
+ int srtp_crypto_suite = stats.channel_stats[0].srtp_cipher; |
+ int ssl_cipher_suite = stats.channel_stats[0].ssl_cipher; |
+ if (!srtp_crypto_suite && !ssl_cipher_suite) { |
return; |
} |
@@ -2179,12 +2179,13 @@ void WebRtcSession::ReportNegotiatedCiphers( |
return; |
} |
- if (!srtp_cipher.empty()) { |
- metrics_observer_->IncrementSparseEnumCounter( |
- srtp_counter_type, rtc::GetSrtpCryptoSuiteFromName(srtp_cipher)); |
+ if (srtp_crypto_suite) { |
+ metrics_observer_->IncrementSparseEnumCounter(srtp_counter_type, |
+ srtp_crypto_suite); |
} |
- if (ssl_cipher) { |
- metrics_observer_->IncrementSparseEnumCounter(ssl_counter_type, ssl_cipher); |
+ if (ssl_cipher_suite) { |
+ metrics_observer_->IncrementSparseEnumCounter(ssl_counter_type, |
+ ssl_cipher_suite); |
} |
} |