mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 09:49:18 +02:00
Compare commits
No commits in common. "3183e2f7337f9fa1f016f99bd3cf5d0619ee161b" and "8b61cf074232994c53c66a09545e814f6174e703" have entirely different histories.
3183e2f733
...
8b61cf0742
2 changed files with 22 additions and 26 deletions
|
@ -139,13 +139,16 @@ init({Port, _, udp} = EndPoint, Module, Opts, SockOpts) ->
|
|||
{error, _} ->
|
||||
ok
|
||||
end;
|
||||
{error, Reason} ->
|
||||
return_socket_error(Reason, EndPoint, Module)
|
||||
{error, Reason} = Err ->
|
||||
report_socket_error(Reason, EndPoint, Module),
|
||||
proc_lib:init_ack(Err)
|
||||
end;
|
||||
{{error, Reason}, _} ->
|
||||
return_socket_error(Reason, EndPoint, Module);
|
||||
{_, {error, Reason} } ->
|
||||
return_socket_error(Reason, EndPoint, Module)
|
||||
{{error, Reason} = Err, _} ->
|
||||
report_socket_error(Reason, EndPoint, Module),
|
||||
proc_lib:init_ack(Err);
|
||||
{_, {error, Reason} = Err} ->
|
||||
report_socket_error(Reason, EndPoint, Module),
|
||||
proc_lib:init_ack(Err)
|
||||
end;
|
||||
init({Port, _, tcp} = EndPoint, Module, Opts, SockOpts) ->
|
||||
case {listen_tcp(Port, SockOpts),
|
||||
|
@ -174,13 +177,16 @@ init({Port, _, tcp} = EndPoint, Module, Opts, SockOpts) ->
|
|||
{error, _} ->
|
||||
ok
|
||||
end;
|
||||
{error, Reason} ->
|
||||
return_socket_error(Reason, EndPoint, Module)
|
||||
{error, Reason} = Err ->
|
||||
report_socket_error(Reason, EndPoint, Module),
|
||||
proc_lib:init_ack(Err)
|
||||
end;
|
||||
{{error, Reason}, _} ->
|
||||
return_socket_error(Reason, EndPoint, Module);
|
||||
{_, {error, Reason}} ->
|
||||
return_socket_error(Reason, EndPoint, Module)
|
||||
{{error, Reason}, _} = Err ->
|
||||
report_socket_error(Reason, EndPoint, Module),
|
||||
proc_lib:init_ack(Err);
|
||||
{_, {error, Reason}} = Err ->
|
||||
report_socket_error(Reason, EndPoint, Module),
|
||||
proc_lib:init_ack(Err)
|
||||
end.
|
||||
|
||||
-spec listen_tcp(inet:port_number(), [gen_tcp:option()]) ->
|
||||
|
@ -602,20 +608,10 @@ config_reloaded() ->
|
|||
end
|
||||
end, New).
|
||||
|
||||
-spec return_socket_error(inet:posix(), endpoint(), module()) -> no_return().
|
||||
return_socket_error(Reason, EndPoint, Module) ->
|
||||
-spec report_socket_error(inet:posix(), endpoint(), module()) -> ok.
|
||||
report_socket_error(Reason, EndPoint, Module) ->
|
||||
?ERROR_MSG("Failed to open socket at ~ts for ~ts: ~ts",
|
||||
[format_endpoint(EndPoint), Module, format_error(Reason)]),
|
||||
return_init_error(Reason).
|
||||
|
||||
-ifdef(OTP_BELOW_26).
|
||||
return_init_error(Reason) ->
|
||||
proc_lib:init_ack({error, Reason}).
|
||||
-else.
|
||||
-spec return_init_error(inet:posix()) -> no_return().
|
||||
return_init_error(Reason) ->
|
||||
proc_lib:init_fail({error, Reason}, {exit, normal}).
|
||||
-endif.
|
||||
[format_endpoint(EndPoint), Module, format_error(Reason)]).
|
||||
|
||||
-spec format_error(inet:posix() | atom()) -> string().
|
||||
format_error(Reason) ->
|
||||
|
|
|
@ -69,7 +69,7 @@ process([], #request{method = 'GET', host = Host, q = Query, raw_path = RawPath1
|
|||
{<<"default_domain">>, Domain},
|
||||
{<<"domain_placeholder">>, Domain},
|
||||
{<<"registration_domain">>, Domain},
|
||||
{<<"assets_path">>, <<RawPath/binary, "/">>},
|
||||
{<<"assets_path">>, RawPath},
|
||||
{<<"view_mode">>, <<"fullscreen">>}
|
||||
| ExtraOptions],
|
||||
Init2 =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue