24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-24 22:25:47 +02:00

Fix problem with merging same port, different ip listeners in config files

Also switch to function used by ejabberd_listener to extract that
information instead of rolling our own code for that.
This commit is contained in:
Paweł Chmielowski 2015-09-01 10:56:43 +02:00
parent 190f76c676
commit e24bfe7b62

View File

@ -370,10 +370,8 @@ exit_or_halt(ExitText) ->
get_config_option_key(Name, Val) -> get_config_option_key(Name, Val) ->
if Name == listen -> if Name == listen ->
case {lists:keyfind(port, 1, Val), lists:keyfind(transport, 1, Val)} of [{Key, _, _}] = ejabberd_listener:validate_cfg([Val]),
{{_, Port}, false} -> {Port, tcp}; Key;
{{_, Port2}, {_, Trans}} -> {Port2, Trans}
end;
is_tuple(Val) -> is_tuple(Val) ->
element(1, Val); element(1, Val);
true -> true ->