Always tag SRTP_PROTECTION_PROFILE and BIO_METHOD as const.
The BIO_METHODs ought to be const so they can go into rodata; BoringSSL makes
BIO_new take a const BIO_METHOD *, so there's no need for it to be non-const.
Also set SRTP_PROTECTION_PROFILE as const so we can constify those within
BoringSSL (https://boringssl-review.googlesource.com/#/c/2720/)
BUG=none
R=henrike@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/34649004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8013 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/base/openssladapter.cc b/webrtc/base/openssladapter.cc
index 603a55b..5caad17 100644
--- a/webrtc/base/openssladapter.cc
+++ b/webrtc/base/openssladapter.cc
@@ -74,7 +74,7 @@
static int socket_new(BIO* h);
static int socket_free(BIO* data);
-static BIO_METHOD methods_socket = {
+static const BIO_METHOD methods_socket = {
BIO_TYPE_BIO,
"socket",
socket_write,
@@ -87,7 +87,7 @@
NULL,
};
-static BIO_METHOD* BIO_s_socket2() { return(&methods_socket); }
+static const BIO_METHOD* BIO_s_socket2() { return(&methods_socket); }
static BIO* BIO_new_socket(rtc::AsyncSocket* socket) {
BIO* ret = BIO_new(BIO_s_socket2());
diff --git a/webrtc/base/opensslstreamadapter.cc b/webrtc/base/opensslstreamadapter.cc
index d790e4e..c88ae04 100644
--- a/webrtc/base/opensslstreamadapter.cc
+++ b/webrtc/base/opensslstreamadapter.cc
@@ -67,7 +67,7 @@
static int stream_new(BIO* h);
static int stream_free(BIO* data);
-static BIO_METHOD methods_stream = {
+static const BIO_METHOD methods_stream = {
BIO_TYPE_BIO,
"stream",
stream_write,
@@ -80,7 +80,7 @@
NULL,
};
-static BIO_METHOD* BIO_s_stream() { return(&methods_stream); }
+static const BIO_METHOD* BIO_s_stream() { return(&methods_stream); }
static BIO* BIO_new_stream(StreamInterface* stream) {
BIO* ret = BIO_new(BIO_s_stream());
@@ -289,7 +289,7 @@
if (state_ != SSL_CONNECTED)
return false;
- SRTP_PROTECTION_PROFILE *srtp_profile =
+ const SRTP_PROTECTION_PROFILE *srtp_profile =
SSL_get_selected_srtp_profile(ssl_);
if (!srtp_profile)