From da6c4f9941e225a064d3c1fc25cef4669ca09c85 Mon Sep 17 00:00:00 2001 From: Badlop Date: Tue, 16 Jun 2009 17:43:43 +0000 Subject: [PATCH] Start supervisor here (thanks to Stefan Strigler) SVN Revision: 2200 --- src/web/mod_http_bind.erl | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/web/mod_http_bind.erl b/src/web/mod_http_bind.erl index c57624e36..34ed88722 100644 --- a/src/web/mod_http_bind.erl +++ b/src/web/mod_http_bind.erl @@ -74,9 +74,18 @@ process(_Path, _Request) -> %%%---------------------------------------------------------------------- %%% BEHAVIOUR CALLBACKS %%%---------------------------------------------------------------------- - start(_Host, _Opts) -> - ok. + supervisor:start_child( + ejabberd_sup, + {ejabberd_http_bind_sup, + {ejabberd_tmp_sup, start_link, + [ejabberd_http_bind_sup, ejabberd_http_bind]}, + permanent, + infinity, + supervisor, + [ejabberd_tmp_sup]}), + ok. stop(_Host) -> - ok. + supervisor:terminate_child(ejabberd_sup, ejabberd_http_bind_sup), + ok.