Harald Welte | fbd4f73 | 2012-05-06 23:29:42 +0200 | [diff] [blame] | 1 | % SIGTRAN SGW ASP supervisor |
| 2 | |
| 3 | % (C) 2012 by Harald Welte <laforge@gnumonks.org> |
| 4 | % |
| 5 | % All Rights Reserved |
| 6 | % |
| 7 | % This program is free software; you can redistribute it and/or modify |
| 8 | % it under the terms of the GNU Affero General Public License as |
| 9 | % published by the Free Software Foundation; either version 3 of the |
| 10 | % License, or (at your option) any later version. |
| 11 | % |
| 12 | % This program is distributed in the hope that it will be useful, |
| 13 | % but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | % GNU General Public License for more details. |
| 16 | % |
| 17 | % You should have received a copy of the GNU Affero General Public License |
| 18 | % along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 19 | % |
| 20 | % Additional Permission under GNU AGPL version 3 section 7: |
| 21 | % |
| 22 | % If you modify this Program, or any covered work, by linking or |
| 23 | % combining it with runtime libraries of Erlang/OTP as released by |
| 24 | % Ericsson on http://www.erlang.org (or a modified version of these |
| 25 | % libraries), containing parts covered by the terms of the Erlang Public |
| 26 | % License (http://www.erlang.org/EPLICENSE), the licensors of this |
| 27 | % Program grant you additional permission to convey the resulting work |
| 28 | % without the need to license the runtime libraries of Erlang/OTP under |
| 29 | % the GNU Affero General Public License. Corresponding Source for a |
| 30 | % non-source form of such a combination shall include the source code |
| 31 | % for the parts of the runtime libraries of Erlang/OTP used as well as |
| 32 | % that of the covered work. |
| 33 | |
| 34 | -module(sg_asp_sup). |
| 35 | -author('Harald Welte <laforge@gnumonks.org>'). |
| 36 | -behaviour(supervisor). |
| 37 | |
| 38 | -export([init/1, start_link/2]). |
| 39 | |
| 40 | init([Name, AsSupPid]) -> |
| 41 | %AsName = list_to_atom("sg_as_" ++ Name ++ "_fsm"), |
Harald Welte | ee7964c | 2012-05-07 23:55:02 +0200 | [diff] [blame^] | 42 | % supervisor:start_child/2 will append to this list of arguments |
Harald Welte | fbd4f73 | 2012-05-06 23:29:42 +0200 | [diff] [blame] | 43 | StartFunc = {xua_asp_fsm, start_link, []}, |
| 44 | ChildSpec = {xua_asp_fsm, StartFunc, permanent, infinity, worker, [xua_asp_fsm]}, |
| 45 | % simple_one_for_one will not start any children! |
| 46 | {ok, {{simple_one_for_one, 10, 60}, [ChildSpec]}}. |
| 47 | |
| 48 | start_link(Name, Options) -> |
| 49 | supervisor:start_link(?MODULE, [Name, Options]). |