list_to_atom

This commit is contained in:
Feng Lee 2016-07-22 11:43:40 +08:00
parent 67637408fc
commit 3c33bdddc7
1 changed files with 2 additions and 2 deletions

View File

@ -91,10 +91,10 @@ list() ->
plugin(CfgFile) ->
[AppName | _] = string:tokens(CfgFile, "."),
{ok, Attrs} = application:get_all_key(AppName),
{ok, Attrs} = application:get_all_key(list_to_atom(AppName)),
Ver = proplists:get_value(vsn, Attrs, "0"),
Descr = proplists:get_value(description, Attrs, ""),
#mqtt_plugin{name = AppName, version = Ver, descr = Descr}.
#mqtt_plugin{name = list_to_atom(AppName), version = Ver, descr = Descr}.
%% @doc Load a Plugin
-spec(load(atom()) -> ok | {error, any()}).