From e60c5e0a191cfcb7aa95d739a0de831eded3a95c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Wala?= Date: Tue, 28 Nov 2023 10:28:21 +0100 Subject: [PATCH] Change return value of `setup_srtp` --- lib/ex_webrtc/dtls_transport.ex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ex_webrtc/dtls_transport.ex b/lib/ex_webrtc/dtls_transport.ex index a9e7e2b7..a34bb8e7 100644 --- a/lib/ex_webrtc/dtls_transport.ex +++ b/lib/ex_webrtc/dtls_transport.ex @@ -213,12 +213,12 @@ defmodule ExWebRTC.DTLSTransport do Logger.debug("DTLS handshake finished") ICEAgent.send_data(state.ice_agent, packets) # TODO: validate fingerprint - state = setup_srtp(state, lkm, rkm, profile) + :ok = setup_srtp(state, lkm, rkm, profile) update_dtls_state(state, :connected) {:handshake_finished, lkm, rkm, profile} -> Logger.debug("DTLS handshake finished") - state = setup_srtp(state, lkm, rkm, profile) + :ok = setup_srtp(state, lkm, rkm, profile) update_dtls_state(state, :connected) :handshake_want_read -> @@ -306,7 +306,7 @@ defmodule ExWebRTC.DTLSTransport do :ok = ExLibSRTP.add_stream(state.out_srtp, outbound_policy) - state + :ok end defp update_dtls_state(%{dtls_state: dtls_state} = state, dtls_state), do: state