25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

mod_matrix_gw_s2s probably works correctly only in Erlang/OTP >= 25

In Erlang/OTP 25, the function inet_res:getbyname/3
returns {ok, Hostent} where the last tuple element of Hostent
may be h_addr_list = [inet:ip_address()]}
or H_addr_list :: [dns_data()]}

However, in Erlang/OTP 24.1 and older, that element was only of type
h_addr_list = [inet:ip_address()]}

https://erlang.org/documentation/doc-13.0-rc3/lib/kernel-8.4/doc/html/inet_res.html#getbyname-3
https://erlang.org/documentation/doc-12.1/lib/kernel-8.1/doc/html/inet_res.html#getbyname-3
This commit is contained in:
Badlop 2024-11-12 16:20:40 +01:00
parent e10c0f3120
commit 9eb8bb6c40
4 changed files with 6 additions and 5 deletions

View File

@ -24,7 +24,7 @@
%%%---------------------------------------------------------------------- %%%----------------------------------------------------------------------
-module(mod_matrix_gw). -module(mod_matrix_gw).
-ifndef(OTP_BELOW_24). -ifndef(OTP_BELOW_25).
-author('alexey@process-one.net'). -author('alexey@process-one.net').
@ -883,7 +883,8 @@ mod_options(Host) ->
mod_doc() -> mod_doc() ->
#{desc => #{desc =>
[?T("https://matrix.org/[Matrix] gateway.")], [?T("https://matrix.org/[Matrix] gateway. "
"Erlang/OTP 25 or higher is required to use this module.")],
note => "added in 24.02", note => "added in 24.02",
example => example =>
["listen:", ["listen:",

View File

@ -24,7 +24,7 @@
%%%------------------------------------------------------------------- %%%-------------------------------------------------------------------
-module(mod_matrix_gw_room). -module(mod_matrix_gw_room).
-ifndef(OTP_BELOW_24). -ifndef(OTP_BELOW_25).
-behaviour(gen_statem). -behaviour(gen_statem).
%% API %% API

View File

@ -23,7 +23,7 @@
%%% %%%
%%%------------------------------------------------------------------- %%%-------------------------------------------------------------------
-module(mod_matrix_gw_s2s). -module(mod_matrix_gw_s2s).
-ifndef(OTP_BELOW_24). -ifndef(OTP_BELOW_25).
-behaviour(gen_statem). -behaviour(gen_statem).
%% API %% API

View File

@ -20,7 +20,7 @@
%%% %%%
%%%---------------------------------------------------------------------- %%%----------------------------------------------------------------------
-module(mod_matrix_gw_sup). -module(mod_matrix_gw_sup).
-ifndef(OTP_BELOW_24). -ifndef(OTP_BELOW_25).
-behaviour(supervisor). -behaviour(supervisor).
%% API %% API