25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

* src/ejabberd_listener.erl (start_listener): Start also the

supervisor of the module

SVN Revision: 1260
This commit is contained in:
Badlop 2008-03-31 09:30:51 +00:00
parent e13908c26c
commit f634e4dc0d
2 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2008-03-31 Badlop <badlop@process-one.net>
* src/ejabberd_listener.erl (start_listener): Start also the
supervisor of the module
2008-03-27 Badlop <badlop@process-one.net> 2008-03-27 Badlop <badlop@process-one.net>
* doc/guide.tex: Fix epam location (thanks to Evgeniy Khramtsov) * doc/guide.tex: Fix epam location (thanks to Evgeniy Khramtsov)

View File

@ -179,6 +179,21 @@ accept_ssl(ListenSocket, Module, Opts) ->
start_listener(Port, Module, Opts) -> start_listener(Port, Module, Opts) ->
start_module_sup(Module),
start_listener_sup(Port, Module, Opts).
start_module_sup(Module) ->
Proc = gen_mod:get_module_proc("sup", Module),
ChildSpec =
{Proc,
{ejabberd_tmp_sup, start_link, [Proc, Module]},
permanent,
infinity,
supervisor,
[ejabberd_tmp_sup]},
supervisor:start_child(ejabberd_sup, ChildSpec).
start_listener_sup(Port, Module, Opts) ->
ChildSpec = {Port, ChildSpec = {Port,
{?MODULE, start, [Port, Module, Opts]}, {?MODULE, start, [Port, Module, Opts]},
transient, transient,