fix issue#17

This commit is contained in:
erylee 2013-07-16 14:39:38 +08:00
parent 9bdbb84ed2
commit 570ca1aa78
2 changed files with 6 additions and 0 deletions

View File

@ -8,7 +8,9 @@
stdlib, stdlib,
sasl, sasl,
mnesia, mnesia,
goldrush,
lager, lager,
syntax_tools,
elog, elog,
compiler, compiler,
{folsom, load}, {folsom, load},
@ -32,8 +34,10 @@
{app, sasl, [{incl_cond, include}]}, {app, sasl, [{incl_cond, include}]},
{app, mnesia, [{incl_cond, include}]}, {app, mnesia, [{incl_cond, include}]},
{app, compiler, [{incl_cond, include}]}, {app, compiler, [{incl_cond, include}]},
{app, goldrush, [{incl_cond, include}]},
{app, lager, [{incl_cond, include}]}, {app, lager, [{incl_cond, include}]},
{app, elog, [{incl_cond, include}]}, {app, elog, [{incl_cond, include}]},
{app, syntax_tools, [{incl_cond, include}]},
{app, folsom, [{incl_cond, include}]}, {app, folsom, [{incl_cond, include}]},
{app, emqtt, [{mod_cond, app}, {incl_cond, include}]} {app, emqtt, [{mod_cond, app}, {incl_cond, include}]}
]}. ]}.

View File

@ -78,6 +78,8 @@ match(Topic) when is_list(Topic) ->
Names = [Name || #trie_node{topic=Name} <- TrieNodes, Name=/= undefined], Names = [Name || #trie_node{topic=Name} <- TrieNodes, Name=/= undefined],
lists:flatten([mnesia:dirty_read(topic, Name) || Name <- Names]). lists:flatten([mnesia:dirty_read(topic, Name) || Name <- Names]).
%TODO: this api is really ugly
down(Client) when is_pid(Client) -> down(Client) when is_pid(Client) ->
gen_server2:cast(?MODULE, {down, Client}). gen_server2:cast(?MODULE, {down, Client}).