26
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01: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) ->
if Name == listen ->
case {lists:keyfind(port, 1, Val), lists:keyfind(transport, 1, Val)} of
{{_, Port}, false} -> {Port, tcp};
{{_, Port2}, {_, Trans}} -> {Port2, Trans}
end;
[{Key, _, _}] = ejabberd_listener:validate_cfg([Val]),
Key;
is_tuple(Val) ->
element(1, Val);
true ->