Harald Welte | f98b8a7 | 2012-02-21 00:20:49 +0100 | [diff] [blame] | 1 | -module(map_app_sup). |
| 2 | -author('Harald Welte <laforge@gnumonks.org>'). |
| 3 | |
| 4 | -behaviour(supervisor). |
| 5 | |
| 6 | -export([init/1, start_link/3]). |
| 7 | |
| 8 | init([{Mod, Args, Opts}, Ssn, AppMod]) -> |
| 9 | TcapFunc = {tcap_sap_sup, start_link, [Mod, Args, Opts]}, |
| 10 | TcapSpec = {tcap, TcapFunc, permanent, 4000, worker, [tcap_sap_sup, Mod]}, |
| 11 | % FIXME: this should go... |
| 12 | TcoName = list_to_atom("tcap_tco_ssn_" ++ integer_to_list(Ssn)), |
| 13 | SssFunc = {gen_server, start_link, [map_ss_server, [Ssn, TcoName], []]}, |
| 14 | SssSpec = {sss, SssFunc, permanent, 4000, worker, [map_ss_server]}, |
| 15 | {ok, {{one_for_one, 1, 1}, [TcapSpec, SssSpec]}}. |
| 16 | |
| 17 | |
| 18 | start_link(MAO, Ssn, AppMod) -> |
| 19 | supervisor:start_link(?MODULE, [MAO, Ssn, AppMod]). |