| Index: webrtc/p2p/base/faketransportcontroller.h
|
| diff --git a/webrtc/p2p/base/faketransportcontroller.h b/webrtc/p2p/base/faketransportcontroller.h
|
| index 3e656fa4a3ff10583726269487e7d3f77fdb7184..dc99bfe61ff29873ef6f4a1e6220655d7c1be0f9 100644
|
| --- a/webrtc/p2p/base/faketransportcontroller.h
|
| +++ b/webrtc/p2p/base/faketransportcontroller.h
|
| @@ -242,13 +242,13 @@ class FakeTransportChannel : public TransportChannelImpl,
|
|
|
| bool IsDtlsActive() const override { return do_dtls_; }
|
|
|
| - bool SetSrtpCiphers(const std::vector<std::string>& ciphers) override {
|
| + bool SetSrtpCryptoSuites(const std::vector<int>& ciphers) override {
|
| srtp_ciphers_ = ciphers;
|
| return true;
|
| }
|
|
|
| - bool GetSrtpCryptoSuite(std::string* cipher) override {
|
| - if (!chosen_srtp_cipher_.empty()) {
|
| + bool GetSrtpCryptoSuite(int* cipher) override {
|
| + if (chosen_srtp_cipher_) {
|
| *cipher = chosen_srtp_cipher_;
|
| return true;
|
| }
|
| @@ -275,7 +275,7 @@ class FakeTransportChannel : public TransportChannelImpl,
|
| bool use_context,
|
| uint8_t* result,
|
| size_t result_len) override {
|
| - if (!chosen_srtp_cipher_.empty()) {
|
| + if (chosen_srtp_cipher_) {
|
| memset(result, 0xff, result_len);
|
| return true;
|
| }
|
| @@ -284,10 +284,9 @@ class FakeTransportChannel : public TransportChannelImpl,
|
| }
|
|
|
| void NegotiateSrtpCiphers() {
|
| - for (std::vector<std::string>::const_iterator it1 = srtp_ciphers_.begin();
|
| + for (std::vector<int>::const_iterator it1 = srtp_ciphers_.begin();
|
| it1 != srtp_ciphers_.end(); ++it1) {
|
| - for (std::vector<std::string>::const_iterator it2 =
|
| - dest_->srtp_ciphers_.begin();
|
| + for (std::vector<int>::const_iterator it2 = dest_->srtp_ciphers_.begin();
|
| it2 != dest_->srtp_ciphers_.end(); ++it2) {
|
| if (*it1 == *it2) {
|
| chosen_srtp_cipher_ = *it1;
|
| @@ -322,8 +321,8 @@ class FakeTransportChannel : public TransportChannelImpl,
|
| rtc::scoped_refptr<rtc::RTCCertificate> local_cert_;
|
| rtc::FakeSSLCertificate* remote_cert_ = nullptr;
|
| bool do_dtls_ = false;
|
| - std::vector<std::string> srtp_ciphers_;
|
| - std::string chosen_srtp_cipher_;
|
| + std::vector<int> srtp_ciphers_;
|
| + int chosen_srtp_cipher_ = 0;
|
| int receiving_timeout_ = -1;
|
| bool gather_continually_ = false;
|
| IceRole role_ = ICEROLE_UNKNOWN;
|
|
|