diff --git a/src/ejabberd_c2s.erl b/src/ejabberd_c2s.erl index 24db8c1ea..fae75a4d2 100644 --- a/src/ejabberd_c2s.erl +++ b/src/ejabberd_c2s.erl @@ -941,14 +941,20 @@ listen_opt_type(max_stanza_size) -> end; listen_opt_type(max_fsm_queue) -> fun(I) when is_integer(I), I>0 -> I end; +%% The following hack should be removed in future releases: it is intended +%% for backward compatibility with ejabberd 17.01 or older +listen_opt_type(stream_management) -> + ?WARNING_MSG("listening option 'stream_management' is deprecated: " + "use mod_stream_mgmt module", []), + fun(B) when is_boolean(B) -> B end; listen_opt_type(O) -> - %% This hack should be removed in future releases: it is intended - %% for backward compatibility with ejabberd 17.01 or older case mod_stream_mgmt:mod_opt_type(O) of L when is_list(L) -> [access, shaper, certfile, ciphers, dhfile, cafile, protocol_options, tls, tls_compression, starttls, - starttls_required, tls_verify, zlib, max_fsm_queue] ++ L; + starttls_required, tls_verify, zlib, max_fsm_queue]; VFun -> + ?WARNING_MSG("listening option '~s' is deprecated: use '~s' " + "option from mod_stream_mgmt module", [O, O]), VFun end. diff --git a/src/mod_stream_mgmt.erl b/src/mod_stream_mgmt.erl index 3465ce779..7b546465e 100644 --- a/src/mod_stream_mgmt.erl +++ b/src/mod_stream_mgmt.erl @@ -722,8 +722,6 @@ mod_opt_type(resend_on_timeout) -> fun(B) when is_boolean(B) -> B; (if_offline) -> if_offline end; -mod_opt_type(stream_management) -> - fun(B) when is_boolean(B) -> B end; mod_opt_type(queue_type) -> fun(ram) -> ram; (file) -> file end; mod_opt_type(_) ->