merge emq10
This commit is contained in:
commit
c7ecc0ace0
|
@ -5,7 +5,23 @@
|
|||
Changes
|
||||
=======
|
||||
|
||||
.. _release_1.0.1:
|
||||
.. _release_1.0.2:
|
||||
|
||||
-------------
|
||||
Version 1.0.2
|
||||
-------------
|
||||
|
||||
*Release Date: 2016-05-04*
|
||||
|
||||
Issue#534 - './bin/emqttd_ctl vm' - add 'port/count', 'port/limit' statistics
|
||||
|
||||
Issue#535 - emqttd_client should be terminated properly even if exception happened when sending data
|
||||
|
||||
PR#519 - The erlang '-name' requires the fully qualified host name
|
||||
|
||||
emqttd_reloader plugin - help reload modified modules during development.
|
||||
|
||||
.. _release_l.0.1:
|
||||
|
||||
-------------
|
||||
Version 1.0.1
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
%% Authetication. Anonymous Default
|
||||
{auth, [
|
||||
%% Authentication with username, password
|
||||
%{username, []},
|
||||
{username, [{test, "password"}, {"test1", "password1"}]},
|
||||
|
||||
%% Authentication with clientid
|
||||
%{clientid, [{password, no}, {file, "etc/clients.config"}]},
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
compiler,
|
||||
runtime_tools,
|
||||
lager,
|
||||
{gen_logger, load},
|
||||
gen_logger,
|
||||
gproc,
|
||||
esockd,
|
||||
mochiweb,
|
||||
|
|
|
@ -89,7 +89,7 @@ check_acl(Client, PubSub, Topic, [{Mod, State, _Seq}|AclMods]) ->
|
|||
end.
|
||||
|
||||
%% @doc Reload ACL Rules.
|
||||
-spec(reload_acl() -> list(ok | {error, any()})).
|
||||
-spec(reload_acl() -> list(ok | {error, already_existed})).
|
||||
reload_acl() ->
|
||||
[Mod:reload_acl(State) || {Mod, State, _Seq} <- lookup_mods(acl)].
|
||||
|
||||
|
@ -201,5 +201,5 @@ mod(Prefix, Name) ->
|
|||
list_to_atom(lists:concat([Prefix, Name])).
|
||||
|
||||
if_existed(false, Fun) -> Fun();
|
||||
if_existed(true, _Fun) -> {error, existed}.
|
||||
if_existed(_Mod, _Fun) -> {error, already_existed}.
|
||||
|
||||
|
|
|
@ -77,6 +77,9 @@ add_user(Username, Password) ->
|
|||
User = #?AUTH_USERNAME_TAB{username = Username, password = hash(Password)},
|
||||
ret(mnesia:transaction(fun mnesia:write/1, [User])).
|
||||
|
||||
add_default_user(Username, Password) when is_atom(Username) ->
|
||||
add_default_user(atom_to_list(Username), Password);
|
||||
|
||||
add_default_user(Username, Password) ->
|
||||
add_user(iolist_to_binary(Username), iolist_to_binary(Password)).
|
||||
|
||||
|
|
|
@ -421,6 +421,6 @@ cli_listeners(_) ->
|
|||
emqttd_cli:listeners([]).
|
||||
|
||||
cli_vm(_) ->
|
||||
emqttd_cli:vm(),
|
||||
emqttd_cli:vm([]),
|
||||
emqttd_cli:vm(["ports"]).
|
||||
|
||||
|
|
|
@ -78,6 +78,7 @@ reload_acl(_) ->
|
|||
|
||||
register_mod(_) ->
|
||||
ok = ?AC:register_mod(acl, emqttd_acl_test_mod, []),
|
||||
{error, already_existed} = ?AC:register_mod(acl, emqttd_acl_test_mod, []),
|
||||
[{emqttd_acl_test_mod, _, 0},
|
||||
{emqttd_acl_internal, _, 0}] = ?AC:lookup_mods(acl),
|
||||
ok = ?AC:register_mod(auth, emqttd_auth_anonymous_test_mod,[]),
|
||||
|
|
Loading…
Reference in New Issue