Make the config_ member of JsepTransportController const

This makes the config_ member thread-safe.
Required breaking out active_reset_srtp_params as a new member
variable, guarded by the network thread.

Bug: none
Change-Id: I81d542744116e5355c53695ea5531735587ba438
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/204200
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33103}
diff --git a/pc/jsep_transport_controller.h b/pc/jsep_transport_controller.h
index 2f9d8a0..ced7804 100644
--- a/pc/jsep_transport_controller.h
+++ b/pc/jsep_transport_controller.h
@@ -98,6 +98,8 @@
     std::function<void(const rtc::CopyOnWriteBuffer& packet,
                        int64_t packet_time_us)>
         rtcp_handler;
+    // Initial value for whether DtlsTransport reset causes a reset
+    // of SRTP parameters.
     bool active_reset_srtp_params = false;
     RtcEventLog* event_log = nullptr;
 
@@ -441,7 +443,8 @@
       PeerConnectionInterface::PeerConnectionState::kNew;
   cricket::IceGatheringState ice_gathering_state_ = cricket::kIceGatheringNew;
 
-  Config config_;
+  const Config config_;
+  bool active_reset_srtp_params_ RTC_GUARDED_BY(network_thread_);
 
   const cricket::SessionDescription* local_desc_ = nullptr;
   const cricket::SessionDescription* remote_desc_ = nullptr;