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.
This commit is contained in:
parent
66a84b8d2b
commit
e7c84b81b2
|
@ -554,7 +554,7 @@ registered_vhosts() ->
|
||||||
|
|
||||||
reload_config() ->
|
reload_config() ->
|
||||||
case ejabberd_config:reload() of
|
case ejabberd_config:reload() of
|
||||||
ok -> {ok, ""};
|
ok -> ok;
|
||||||
Err ->
|
Err ->
|
||||||
Reason = ejabberd_config:format_error(Err),
|
Reason = ejabberd_config:format_error(Err),
|
||||||
{error, Reason}
|
{error, Reason}
|
||||||
|
@ -562,7 +562,7 @@ reload_config() ->
|
||||||
|
|
||||||
dump_config(Path) ->
|
dump_config(Path) ->
|
||||||
case ejabberd_config:dump(Path) of
|
case ejabberd_config:dump(Path) of
|
||||||
ok -> {ok, ""};
|
ok -> ok;
|
||||||
Err ->
|
Err ->
|
||||||
Reason = ejabberd_config:format_error(Err),
|
Reason = ejabberd_config:format_error(Err),
|
||||||
{error, Reason}
|
{error, Reason}
|
||||||
|
|
Loading…
Reference in New Issue