OLD | NEW |
---|---|
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
693 // same local and remote certificates. | 693 // same local and remote certificates. |
694 // | 694 // |
695 // Note that Transport::GetIdentity and Transport::GetRemoteCertificate | 695 // Note that Transport::GetIdentity and Transport::GetRemoteCertificate |
696 // invoke method calls on the worker thread and block this thread, but | 696 // invoke method calls on the worker thread and block this thread, but |
697 // messages are still processed on this thread, which may blow way the | 697 // messages are still processed on this thread, which may blow way the |
698 // existing transports. So we cannot reuse |transport| after these calls. | 698 // existing transports. So we cannot reuse |transport| after these calls. |
699 StatsReport::Id local_cert_report_id, remote_cert_report_id; | 699 StatsReport::Id local_cert_report_id, remote_cert_report_id; |
700 | 700 |
701 cricket::Transport* transport = | 701 cricket::Transport* transport = |
702 session_->GetTransport(transport_iter.second.content_name); | 702 session_->GetTransport(transport_iter.second.content_name); |
703 rtc::scoped_ptr<rtc::SSLIdentity> identity; | 703 rtc::scoped_refptr<webrtc::DtlsCertificate> dtlscert; |
704 if (transport && transport->GetIdentity(identity.accept())) { | 704 if (transport && transport->GetCertificate(&dtlscert)) { |
705 StatsReport* r = AddCertificateReports(&(identity->certificate())); | 705 StatsReport* r = AddCertificateReports( |
706 &(dtlscert->identity()->certificate())); | |
Henrik Grunell WebRTC
2015/08/12 14:46:29
This is confusing. What's the cert we get from the
hbos
2015/08/14 14:09:39
Yeah, two things called certificate is confusing..
Henrik Grunell WebRTC
2015/08/18 14:25:11
OK. If this is clear in the DtlsCertificate class
| |
706 if (r) | 707 if (r) |
707 local_cert_report_id = r->id(); | 708 local_cert_report_id = r->id(); |
708 } | 709 } |
709 | 710 |
710 transport = session_->GetTransport(transport_iter.second.content_name); | 711 transport = session_->GetTransport(transport_iter.second.content_name); |
711 rtc::scoped_ptr<rtc::SSLCertificate> cert; | 712 rtc::scoped_ptr<rtc::SSLCertificate> cert; |
712 if (transport && transport->GetRemoteCertificate(cert.accept())) { | 713 if (transport && transport->GetRemoteCertificate(cert.accept())) { |
713 StatsReport* r = AddCertificateReports(cert.get()); | 714 StatsReport* r = AddCertificateReports(cert.get()); |
714 if (r) | 715 if (r) |
715 remote_cert_report_id = r->id(); | 716 remote_cert_report_id = r->id(); |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
935 report->set_timestamp(stats_gathering_started_); | 936 report->set_timestamp(stats_gathering_started_); |
936 } | 937 } |
937 | 938 |
938 } | 939 } |
939 | 940 |
940 void StatsCollector::ClearUpdateStatsCacheForTest() { | 941 void StatsCollector::ClearUpdateStatsCacheForTest() { |
941 stats_gathering_started_ = 0; | 942 stats_gathering_started_ = 0; |
942 } | 943 } |
943 | 944 |
944 } // namespace webrtc | 945 } // namespace webrtc |
OLD | NEW |