mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 09:49:18 +02:00
Fix some typos in previous commit (#4422)
This commit is contained in:
parent
99b75396ad
commit
f7002c31f0
1 changed files with 4 additions and 5 deletions
|
@ -119,7 +119,6 @@ init({Port, _, udp} = EndPoint, Module, Opts, SockOpts) ->
|
||||||
ExtraOpts2]),
|
ExtraOpts2]),
|
||||||
set_definitive_udsocket(Port, Opts)} of
|
set_definitive_udsocket(Port, Opts)} of
|
||||||
{{ok, Socket}, ok} ->
|
{{ok, Socket}, ok} ->
|
||||||
set_definitive_udsocket(Port, Opts),
|
|
||||||
misc:set_proc_label({?MODULE, udp, Port}),
|
misc:set_proc_label({?MODULE, udp, Port}),
|
||||||
case inet:sockname(Socket) of
|
case inet:sockname(Socket) of
|
||||||
{ok, {Addr, Port1}} ->
|
{ok, {Addr, Port1}} ->
|
||||||
|
@ -144,10 +143,10 @@ init({Port, _, udp} = EndPoint, Module, Opts, SockOpts) ->
|
||||||
report_socket_error(Reason, EndPoint, Module),
|
report_socket_error(Reason, EndPoint, Module),
|
||||||
proc_lib:init_ack(Err)
|
proc_lib:init_ack(Err)
|
||||||
end;
|
end;
|
||||||
{{error, Reason}, _} = Err ->
|
{{error, Reason} = Err, _} ->
|
||||||
report_socket_error(Reason, EndPoint, Module),
|
report_socket_error(Reason, EndPoint, Module),
|
||||||
proc_lib:init_ack(Err);
|
proc_lib:init_ack(Err);
|
||||||
{_, {error, Reason}} = Err ->
|
{_, {error, Reason} = Err} ->
|
||||||
report_socket_error(Reason, EndPoint, Module),
|
report_socket_error(Reason, EndPoint, Module),
|
||||||
proc_lib:init_ack(Err)
|
proc_lib:init_ack(Err)
|
||||||
end;
|
end;
|
||||||
|
@ -240,7 +239,7 @@ get_definitive_udsocket_path(ProvisionalPath) ->
|
||||||
{term, Path} = misc:base64_to_term(PathBase64),
|
{term, Path} = misc:base64_to_term(PathBase64),
|
||||||
relative_socket_to_mnesia(Path).
|
relative_socket_to_mnesia(Path).
|
||||||
|
|
||||||
-spec set_definitive_udsocket(binary(), opts()) -> ok | {error, file:posix() | badarg}.
|
-spec set_definitive_udsocket(integer() | binary(), opts()) -> ok | {error, file:posix() | badarg}.
|
||||||
|
|
||||||
set_definitive_udsocket(<<"unix:", Path/binary>>, Opts) ->
|
set_definitive_udsocket(<<"unix:", Path/binary>>, Opts) ->
|
||||||
Prov = get_provisional_udsocket_path(Path),
|
Prov = get_provisional_udsocket_path(Path),
|
||||||
|
@ -280,7 +279,7 @@ set_definitive_udsocket(<<"unix:", Path/binary>>, Opts) ->
|
||||||
ok
|
ok
|
||||||
end,
|
end,
|
||||||
file:rename(Prov, FinalPath);
|
file:rename(Prov, FinalPath);
|
||||||
set_definitive_udsocket(_Port, _Opts) ->
|
set_definitive_udsocket(Port, _Opts) when is_integer(Port) ->
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
relative_socket_to_mnesia(Path1) ->
|
relative_socket_to_mnesia(Path1) ->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue