mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Merge 1883 from trunk.
* src/ejabberd_listener.erl: More error detections SVN Revision: 1951
This commit is contained in:
parent
f80758f0de
commit
36fc43c364
@ -1,5 +1,7 @@
|
|||||||
2009-03-03 Badlop <badlop@process-one.net>
|
2009-03-03 Badlop <badlop@process-one.net>
|
||||||
|
|
||||||
|
* src/ejabberd_listener.erl: More error detections
|
||||||
|
|
||||||
* src/ejabberd_config.erl: Check certfiles are readable on server
|
* src/ejabberd_config.erl: Check certfiles are readable on server
|
||||||
start and listener start (EJAB-753)
|
start and listener start (EJAB-753)
|
||||||
* src/ejabberd_listener.erl: Likewise
|
* src/ejabberd_listener.erl: Likewise
|
||||||
|
@ -124,6 +124,7 @@ init(PortIP, Module, Opts1) ->
|
|||||||
{error, Reason} ->
|
{error, Reason} ->
|
||||||
ReasonT = case Reason of
|
ReasonT = case Reason of
|
||||||
eaddrnotavail -> "IP address not available: " ++ IPS;
|
eaddrnotavail -> "IP address not available: " ++ IPS;
|
||||||
|
eaddrinuse -> "IP address and port number already used: "++IPS++" "++integer_to_list(Port);
|
||||||
_ -> atom_to_list(Reason)
|
_ -> atom_to_list(Reason)
|
||||||
end,
|
end,
|
||||||
?ERROR_MSG("Failed to open socket:~n ~p~nReason: ~s",
|
?ERROR_MSG("Failed to open socket:~n ~p~nReason: ~s",
|
||||||
@ -225,6 +226,12 @@ start_listener(Port, Module, Opts) ->
|
|||||||
"It could not be loaded or is not an ejabberd listener.~n"
|
"It could not be loaded or is not an ejabberd listener.~n"
|
||||||
"Error: ~p~n", [Module, Error]),
|
"Error: ~p~n", [Module, Error]),
|
||||||
{error, lists:flatten(EStr)};
|
{error, lists:flatten(EStr)};
|
||||||
|
{error, {already_started, _Pid} = Error} ->
|
||||||
|
EStr = io_lib:format(
|
||||||
|
"Error starting the ejabberd listener: ~p.~n"
|
||||||
|
"A listener is already started in that port number and IP address:~n~p~n"
|
||||||
|
"Error: ~p~n", [Module, Port, Error]),
|
||||||
|
{error, lists:flatten(EStr)};
|
||||||
{error, Error} ->
|
{error, Error} ->
|
||||||
{error, Error}
|
{error, Error}
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user