mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Remove http supervisors
This commit is contained in:
parent
3bdd5d0d25
commit
8ee5f9fb6f
@ -84,8 +84,9 @@
|
||||
"">>).
|
||||
|
||||
start(SockData, Opts) ->
|
||||
supervisor:start_child(ejabberd_http_sup,
|
||||
[SockData, Opts]).
|
||||
{ok,
|
||||
proc_lib:spawn(ejabberd_http, init,
|
||||
[SockData, Opts])}.
|
||||
|
||||
start_link(SockData, Opts) ->
|
||||
{ok,
|
||||
|
@ -152,9 +152,9 @@
|
||||
|
||||
start(XMPPDomain, Sid, Key, IP, HOpts) ->
|
||||
?DEBUG("Starting session", []),
|
||||
SupervisorProc = gen_mod:get_module_proc(XMPPDomain, ?PROCNAME_MHB),
|
||||
case catch supervisor:start_child(SupervisorProc,
|
||||
[Sid, Key, IP, HOpts])
|
||||
case catch gen_fsm:start(?MODULE,
|
||||
[Sid, Key, IP, HOpts],
|
||||
?FSMOPTS)
|
||||
of
|
||||
{ok, Pid} -> {ok, Pid};
|
||||
_ -> check_bind_module(XMPPDomain),
|
||||
|
@ -75,7 +75,7 @@
|
||||
-export_type([ws_socket/0]).
|
||||
|
||||
start(WS) ->
|
||||
supervisor:start_child(ejabberd_wsloop_sup, [WS]).
|
||||
gen_fsm:start(?MODULE, [WS], ?FSMOPTS).
|
||||
|
||||
start_link(WS) ->
|
||||
gen_fsm:start_link(?MODULE, [WS], ?FSMOPTS).
|
||||
|
@ -121,14 +121,6 @@ init([]) ->
|
||||
infinity,
|
||||
supervisor,
|
||||
[ejabberd_tmp_sup]},
|
||||
HTTPSupervisor =
|
||||
{ejabberd_http_sup,
|
||||
{ejabberd_tmp_sup, start_link,
|
||||
[ejabberd_http_sup, ejabberd_http]},
|
||||
permanent,
|
||||
infinity,
|
||||
supervisor,
|
||||
[ejabberd_tmp_sup]},
|
||||
FrontendSocketSupervisor =
|
||||
{ejabberd_frontend_socket_sup,
|
||||
{ejabberd_tmp_sup, start_link,
|
||||
@ -157,7 +149,6 @@ init([]) ->
|
||||
S2SInSupervisor,
|
||||
S2SOutSupervisor,
|
||||
ServiceSupervisor,
|
||||
HTTPSupervisor,
|
||||
IQSupervisor,
|
||||
FrontendSocketSupervisor,
|
||||
Listener]}}.
|
||||
|
@ -81,19 +81,11 @@ process(_Path, _Request) ->
|
||||
%%%----------------------------------------------------------------------
|
||||
%%% BEHAVIOUR CALLBACKS
|
||||
%%%----------------------------------------------------------------------
|
||||
start(Host, _Opts) ->
|
||||
setup_database(),
|
||||
Proc = gen_mod:get_module_proc(Host, ?PROCNAME_MHB),
|
||||
ChildSpec = {Proc,
|
||||
{ejabberd_tmp_sup, start_link,
|
||||
[Proc, ejabberd_http_bind]},
|
||||
permanent, infinity, supervisor, [ejabberd_tmp_sup]},
|
||||
supervisor:start_child(ejabberd_sup, ChildSpec).
|
||||
start(_Host, _Opts) ->
|
||||
setup_database().
|
||||
|
||||
stop(Host) ->
|
||||
Proc = gen_mod:get_module_proc(Host, ?PROCNAME_MHB),
|
||||
supervisor:terminate_child(ejabberd_sup, Proc),
|
||||
supervisor:delete_child(ejabberd_sup, Proc).
|
||||
stop(_Host) ->
|
||||
ok.
|
||||
|
||||
setup_database() ->
|
||||
migrate_database(),
|
||||
|
Loading…
Reference in New Issue
Block a user