mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
Emit deprecation warning for SM related listening options
This commit is contained in:
parent
b174e2c9c6
commit
f2dc8c0442
@ -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;
|
||||
listen_opt_type(O) ->
|
||||
%% This hack should be removed in future releases: it is intended
|
||||
%% 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) ->
|
||||
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.
|
||||
|
@ -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(_) ->
|
||||
|
Loading…
Reference in New Issue
Block a user