Skip to content

Commit aa2b5d6

Browse files
committed
Fix warnings
1 parent 9fe30ba commit aa2b5d6

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

lib/ex_libnice.ex

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ defmodule ExLibnice do
298298
{:reply, {:ok, stream_id}, put_in(state.stream_components[stream_id], n_components)}
299299

300300
{{:error, cause}, state} ->
301-
Logger.warn("""
301+
Logger.warning("""
302302
Couldn't add stream with #{n_components} components and name "#{inspect(name)}": \
303303
#{inspect(cause)}
304304
""")
@@ -325,7 +325,7 @@ defmodule ExLibnice do
325325
{:reply, :ok, state}
326326

327327
{{:error, cause}, state} ->
328-
Logger.warn("""
328+
Logger.warning("""
329329
Couldn't forget TURN servers for component: #{inspect(component_id)} in stream: \
330330
#{inspect(stream_id)}, reason: #{inspect(cause)}
331331
""")
@@ -349,7 +349,7 @@ defmodule ExLibnice do
349349
{:reply, {:ok, added_cand_num}, state}
350350

351351
{{:error, cause}, state} ->
352-
Logger.warn("Couldn't parse remote sdp #{inspect(remote_sdp)}")
352+
Logger.warning("Couldn't parse remote sdp #{inspect(remote_sdp)}")
353353
{:reply, {:error, cause}, state}
354354
end
355355
end
@@ -409,7 +409,7 @@ defmodule ExLibnice do
409409
{:reply, :ok, state}
410410

411411
{{:error, cause}, state} ->
412-
Logger.warn("peer_candidate_gathering_done: #{inspect(cause)}")
412+
Logger.warning("peer_candidate_gathering_done: #{inspect(cause)}")
413413
{:reply, {:error, cause}, state}
414414
end
415415
end
@@ -449,8 +449,8 @@ defmodule ExLibnice do
449449
{:reply, :ok, state}
450450
end
451451
else
452-
candidate_check: _ -> {:reply, {:error, :failed_to_parse_sdp_string}, state}
453-
mdns_check: _ -> do_set_remote_candidate(candidate, stream_id, component_id, state)
452+
candidate_check: _x -> {:reply, {:error, :failed_to_parse_sdp_string}, state}
453+
mdns_check: _x -> do_set_remote_candidate(candidate, stream_id, component_id, state)
454454
end
455455
end
456456

@@ -462,7 +462,7 @@ defmodule ExLibnice do
462462
{:reply, :ok, state}
463463

464464
{{:error, cause}, state} ->
465-
Logger.warn("Couldn't restart ICE")
465+
Logger.warning("Couldn't restart ICE")
466466
{:reply, {:error, cause}, state}
467467
end
468468
end
@@ -475,7 +475,7 @@ defmodule ExLibnice do
475475
{:reply, :ok, state}
476476

477477
{{:error, cause}, state} ->
478-
Logger.warn("Couldn't restart stream #{inspect(stream_id)}")
478+
Logger.warning("Couldn't restart stream #{inspect(stream_id)}")
479479
{:reply, {:error, cause}, state}
480480
end
481481
end
@@ -487,7 +487,7 @@ defmodule ExLibnice do
487487
{:reply, :ok, state}
488488

489489
{{:error, cause}, state} ->
490-
Logger.warn("Couldn't send payload: #{inspect(cause)}")
490+
Logger.warning("Couldn't send payload: #{inspect(cause)}")
491491
{:reply, {:error, cause}, state}
492492
end
493493
end
@@ -546,7 +546,7 @@ defmodule ExLibnice do
546546
{:component_state_failed, _stream_id, _component_id} = msg,
547547
%State{parent: parent} = state
548548
) do
549-
Logger.warn("#{inspect(msg)}")
549+
Logger.warning("#{inspect(msg)}")
550550
send(parent, msg)
551551
{:noreply, state}
552552
end
@@ -578,7 +578,7 @@ defmodule ExLibnice do
578578

579579
@impl true
580580
def handle_info(msg, state) do
581-
Logger.warn("Unknown message #{inspect(msg)}")
581+
Logger.warning("Unknown message #{inspect(msg)}")
582582
{:noreply, state}
583583
end
584584

@@ -603,7 +603,7 @@ defmodule ExLibnice do
603603
defp do_set_relay_info(state, stream_id, :all, relay_info) do
604604
case Map.get(state.stream_components, stream_id) do
605605
nil ->
606-
Logger.warn("Couldn't set TURN servers. No stream with id #{inspect(stream_id)}")
606+
Logger.warning("Couldn't set TURN servers. No stream with id #{inspect(stream_id)}")
607607

608608
{{:error, :bad_stream_id}, state}
609609

@@ -621,7 +621,7 @@ defmodule ExLibnice do
621621
%{server_addr: server_addr, server_port: server_port, relay_type: relay_type}
622622
)
623623
when relay_type not in [:udp, :tcp, :tls] do
624-
Logger.warn("""
624+
Logger.warning("""
625625
Couldn't set TURN server #{inspect(server_addr)} #{inspect(server_port)} \
626626
#{inspect(relay_type)} for component: #{inspect(component_id)} in stream: \
627627
#{inspect(stream_id)}, cause: bad_relay_type
@@ -656,14 +656,14 @@ defmodule ExLibnice do
656656
{:ok, state}
657657
else
658658
{:error, :failed_to_lookup_addr} = err ->
659-
Logger.warn("""
659+
Logger.warning("""
660660
Couldn't lookup TURN server address #{inspect(server_addr)}
661661
""")
662662

663663
{err, state}
664664

665665
{{:error, cause}, _state} = ret ->
666-
Logger.warn("""
666+
Logger.warning("""
667667
Couldn't set TURN server #{inspect(server_addr)} #{inspect(server_port)} \
668668
#{inspect(relay_type)} for component: #{inspect(component_id)} in stream: \
669669
#{inspect(stream_id)}, cause: #{inspect(cause)}
@@ -680,7 +680,7 @@ defmodule ExLibnice do
680680
{:reply, :ok, state}
681681

682682
{{:error, cause}, state} ->
683-
Logger.warn("Couldn't set remote candidate: #{inspect(cause)}")
683+
Logger.warning("Couldn't set remote candidate: #{inspect(cause)}")
684684
{:reply, {:error, cause}, state}
685685
end
686686
end

0 commit comments

Comments
 (0)