Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssl: Fix creation of process labels #8465

Merged
merged 1 commit into from
May 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions lib/ssl/src/ssl_gen_statem.erl
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,14 @@ init_label(?SERVER_ROLE = Role, _, Port, Options) ->

host_str(Host) when is_list(Host) ->
Host;
host_str(Host) when is_tuple(Host) ->
IPStrs = [erlang:integer_to_list(I) || I <- tuple_to_list(Host)],
host_str({local, File}) when is_list(File); is_binary(File) ->
File;
host_str(IPv4) when tuple_size(IPv4) =:= 4 ->
IPStrs = [erlang:integer_to_list(I) || I <- tuple_to_list(IPv4)],
lists:join(".", IPStrs);
host_str(IPv6) when tuple_size(IPv6) =:= 8 ->
IPStrs = [erlang:integer_to_list(I, 16) || I <- tuple_to_list(IPv6)],
lists:join(":", IPStrs);
host_str(Host) when is_atom(Host) ->
atom_to_list(Host).

Expand Down
Loading