Skip to content
Browse files

Fix get_env

  • Loading branch information...
1 parent 752e3c2 commit 390f2a5db6633845e256701e11333dc800970dc3 @Zert Zert committed Nov 3, 2011
Showing with 15 additions and 2 deletions.
  1. +2 −1 ebin/metalkia_xmpp.app
  2. +12 −0 src/mtxmpp.erl
  3. +1 −1 src/mtxmpp_sup.erl
View
3 ebin/metalkia_xmpp.app
@@ -5,4 +5,5 @@
{applications,[kernel,stdlib,exmpp,metalkia_core]},
{mod,{mtxmpp_app,[]}},
{env,[]},
- {modules,[mtxmpp_app,mtxmpp_client,mtxmpp_cmd,mtxmpp_sup]}]}.
+ {modules,[mtxmpp,mtxmpp_app,mtxmpp_client,mtxmpp_cmd,
+ mtxmpp_sup]}]}.
View
12 src/mtxmpp.erl
@@ -0,0 +1,12 @@
+-module(mtxmpp).
+
+-export([
+ get_env/1,
+ get_env/2
+]).
+
+get_env(Param) ->
+ mtc_util:get_env(?MODULE, Param, undefined).
+
+get_env(Param, Default) ->
+ mtc_util:get_env(?MODULE, Param, Default).
View
2 src/mtxmpp_sup.erl
@@ -66,7 +66,7 @@ init([]) ->
Restart, Shutdown, supervisor, [?MODULE]}
],
- IsEnabled = application:get_env(enabled),
+ IsEnabled = mtxmpp:get_env(enabled, false),
Children =
if IsEnabled ->
[

0 comments on commit 390f2a5

Please sign in to comment.
Something went wrong with that request. Please try again.