From: Paweł Chmielowski Date: Wed, 11 Jul 2018 12:07:24 +0000 (+0200) Subject: Adopt code that uses parse_listener_portip after result change X-Git-Tag: 18.09~102 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=48be8e7b1ea3ea5a205d1e19c887c0e7ed682c30;p=ejabberd Adopt code that uses parse_listener_portip after result change --- diff --git a/src/ejabberd_listener.erl b/src/ejabberd_listener.erl index 28edf9453..54bc877cc 100644 --- a/src/ejabberd_listener.erl +++ b/src/ejabberd_listener.erl @@ -350,7 +350,7 @@ stop_listener({_, _, Transport} = PortIP, Module) -> end. add_listener(PortIP, Module, Opts) -> - {Port, IPT, _, _, Proto, _} = parse_listener_portip(PortIP, Opts), + {Port, IPT, _, Proto, _} = parse_listener_portip(PortIP, Opts), PortIP1 = {Port, IPT, Proto}, case start_listener(PortIP1, Module, Opts) of {ok, _Pid} -> @@ -373,7 +373,7 @@ delete_listener(PortIP, Module) -> %% Module = atom() %% Opts = [term()] delete_listener(PortIP, Module, Opts) -> - {Port, IPT, _, _, Proto, _} = parse_listener_portip(PortIP, Opts), + {Port, IPT, _, Proto, _} = parse_listener_portip(PortIP, Opts), PortIP1 = {Port, IPT, Proto}, stop_listener(PortIP1, Module). diff --git a/src/ejabberd_web_admin.erl b/src/ejabberd_web_admin.erl index 7f031dce0..46c957330 100644 --- a/src/ejabberd_web_admin.erl +++ b/src/ejabberd_web_admin.erl @@ -2242,8 +2242,9 @@ make_netprot_html(NetProt) -> [<<"tcp">>, <<"udp">>]))). get_port_data(PortIP, Opts) -> - {Port, IPT, IPS, _IPV, NetProt, OptsClean} = + {Port, IPT, _IPV, NetProt, OptsClean} = ejabberd_listener:parse_listener_portip(PortIP, Opts), + IPS = misc:ip_to_list(IPT), SPort = integer_to_binary(Port), SSPort = list_to_binary( lists:map(fun (N) ->