From 7b9b7c1cc416b0d5b1f2d5223ca5e012ddce0ea7 Mon Sep 17 00:00:00 2001 From: Jay Nelson Date: Mon, 5 Mar 2012 20:06:14 -0800 Subject: Add inets_sup:start_link/0 inets_app calls supervisor:start_link/3 directly rather than calling the root supervisor function inets_sup:start_link/0. This precludes using included_applications to start inets without having a wrapper function. This patch makes inets_app follow the standard OTP application structure. --- lib/inets/src/inets_app/inets_app.erl | 2 +- lib/inets/src/inets_app/inets_sup.erl | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/inets/src/inets_app/inets_app.erl b/lib/inets/src/inets_app/inets_app.erl index cae79a6767..77c39d85eb 100644 --- a/lib/inets/src/inets_app/inets_app.erl +++ b/lib/inets/src/inets_app/inets_app.erl @@ -24,7 +24,7 @@ -export([start/2, stop/1]). start(_Type, _State) -> - supervisor:start_link({local, inets_sup}, inets_sup, []). + inets_sup:start_link(). stop(_State) -> ok. diff --git a/lib/inets/src/inets_app/inets_sup.erl b/lib/inets/src/inets_app/inets_sup.erl index 20d5ef343e..0382362778 100644 --- a/lib/inets/src/inets_app/inets_sup.erl +++ b/lib/inets/src/inets_app/inets_sup.erl @@ -25,8 +25,18 @@ -behaviour(supervisor). +%% External API +-export([start_link/0]). + +%% Supervisor callbacks -export([init/1]). +%%%========================================================================= +%%% External functions +%%%========================================================================= +start_link() -> + supervisor:start_link({local, ?MODULE}, ?MODULE, []). + %%%========================================================================= %%% Supervisor callback %%%========================================================================= -- cgit v1.2.3