ejabberd_admin: Fix *_config command result format

The 'reload_config' and 'dump_config' calls are expected to yield a
'rescode' result, which means they must return 'ok' (rather than a
tuple) on success.

Fixes #3170.
pull/3183/head
Holger Weiss 3 years ago
parent 66a84b8d2b
commit e7c84b81b2

@ -554,7 +554,7 @@ registered_vhosts() ->
reload_config() ->
case ejabberd_config:reload() of
ok -> {ok, ""};
ok -> ok;
Err ->
Reason = ejabberd_config:format_error(Err),
{error, Reason}
@ -562,7 +562,7 @@ reload_config() ->
dump_config(Path) ->
case ejabberd_config:dump(Path) of
ok -> {ok, ""};
ok -> ok;
Err ->
Reason = ejabberd_config:format_error(Err),
{error, Reason}

Loading…
Cancel
Save