Skip to content

Commit

Permalink
Change return value of setup_srtp
Browse files Browse the repository at this point in the history
  • Loading branch information
LVala committed Nov 28, 2023
1 parent a4a77f6 commit e60c5e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/ex_webrtc/dtls_transport.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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 ->
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e60c5e0

Please sign in to comment.