From: Evgeniy Khramtsov Date: Fri, 24 Feb 2017 09:39:44 +0000 (+0300) Subject: Return ejabberd_sm:stop/0 back X-Git-Tag: 17.03~86 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c15d230a5763152f19c667b509b733e9b09d96d9;p=ejabberd Return ejabberd_sm:stop/0 back --- diff --git a/src/ejabberd_sm.erl b/src/ejabberd_sm.erl index 173b9a2ad..5f7d9740c 100644 --- a/src/ejabberd_sm.erl +++ b/src/ejabberd_sm.erl @@ -36,6 +36,7 @@ %% API -export([start_link/0, + stop/0, route/1, route/2, process_iq/1, @@ -111,6 +112,12 @@ start_link() -> ?GEN_SERVER:start_link({local, ?MODULE}, ?MODULE, [], []). +-spec stop() -> ok. +stop() -> + supervisor:terminate_child(ejabberd_sup, ?MODULE), + supervisor:delete_child(ejabberd_sup, ?MODULE), + ok. + -spec route(jid(), term()) -> ok. %% @doc route arbitrary term to c2s process(es) route(To, Term) ->