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

Fix calls to register_feature

This commit is contained in:
Badlop 2010-04-14 01:08:22 +02:00
parent 7fffae5b1a
commit 67cced15b9
4 changed files with 8 additions and 8 deletions

View File

@ -96,7 +96,7 @@ init([Host, Opts]) ->
PingInterval = gen_mod:get_opt(ping_interval, Opts, ?DEFAULT_PING_INTERVAL),
TimeoutAction = gen_mod:get_opt(timeout_action, Opts, none),
IQDisc = gen_mod:get_opt(iqdisc, Opts, one_queue),
mod_disco:register_feature(Host, ?NS_PING),
mod_disco:register_feature(HostB, ?NS_PING),
gen_iq_handler:add_iq_handler(ejabberd_sm, HostB, ?NS_PING,
?MODULE, iq_ping, IQDisc),
gen_iq_handler:add_iq_handler(ejabberd_local, HostB, ?NS_PING,
@ -128,7 +128,7 @@ terminate(_Reason, #state{host = Host}) ->
?MODULE, user_send, 100),
gen_iq_handler:remove_iq_handler(ejabberd_local, HostB, ?NS_PING),
gen_iq_handler:remove_iq_handler(ejabberd_sm, HostB, ?NS_PING),
mod_disco:unregister_feature(Host, ?NS_PING).
mod_disco:unregister_feature(HostB, ?NS_PING).
handle_call(stop, _From, State) ->
{stop, normal, ok, State};

View File

@ -189,7 +189,7 @@ init([ServerHost, Opts]) ->
ets:new(gen_mod:get_module_proc(Host, last_items), [set, named_table]),
ets:new(gen_mod:get_module_proc(ServerHost, last_items), [set, named_table]),
{Plugins, NodeTree, PepMapping} = init_plugins(Host, ServerHost, Opts),
mod_disco:register_feature(ServerHost, ?NS_PUBSUB_s),
mod_disco:register_feature(ServerHostB, ?NS_PUBSUB_s),
ets:insert(gen_mod:get_module_proc(Host, config), {nodetree, NodeTree}),
ets:insert(gen_mod:get_module_proc(Host, config), {plugins, Plugins}),
ets:insert(gen_mod:get_module_proc(Host, config), {last_item_cache, LastItemCache}),
@ -894,7 +894,7 @@ terminate(_Reason, #state{host = Host,
ejabberd_hooks:delete(anonymous_purge_hook, ServerHostB, ?MODULE, remove_user, 50),
gen_iq_handler:remove_iq_handler(ejabberd_sm, ServerHostB, ?NS_PUBSUB),
gen_iq_handler:remove_iq_handler(ejabberd_sm, ServerHostB, ?NS_PUBSUB_OWNER),
mod_disco:unregister_feature(ServerHost, ?NS_PUBSUB_s),
mod_disco:unregister_feature(ServerHostB, ?NS_PUBSUB_s),
gen_mod:get_module_proc(ServerHost, ?LOOPNAME) ! stop,
terminate_plugins(Host, ServerHost, Plugins, TreePlugin).

View File

@ -189,7 +189,7 @@ init([ServerHost, Opts]) ->
ets:new(gen_mod:get_module_proc(Host, last_items), [set, named_table]),
ets:new(gen_mod:get_module_proc(ServerHost, last_items), [set, named_table]),
{Plugins, NodeTree, PepMapping} = init_plugins(Host, ServerHost, Opts),
mod_disco:register_feature(ServerHost, ?NS_PUBSUB_s),
mod_disco:register_feature(ServerHostB, ?NS_PUBSUB_s),
ets:insert(gen_mod:get_module_proc(Host, config), {nodetree, NodeTree}),
ets:insert(gen_mod:get_module_proc(Host, config), {plugins, Plugins}),
ets:insert(gen_mod:get_module_proc(Host, config), {last_item_cache, LastItemCache}),
@ -699,7 +699,7 @@ terminate(_Reason, #state{host = Host,
ejabberd_hooks:delete(anonymous_purge_hook, ServerHostB, ?MODULE, remove_user, 50),
gen_iq_handler:remove_iq_handler(ejabberd_sm, ServerHostB, ?NS_PUBSUB),
gen_iq_handler:remove_iq_handler(ejabberd_sm, ServerHostB, ?NS_PUBSUB_OWNER),
mod_disco:unregister_feature(ServerHost, ?NS_PUBSUB_s),
mod_disco:unregister_feature(ServerHostB, ?NS_PUBSUB_s),
gen_mod:get_module_proc(ServerHost, ?LOOPNAME) ! stop,
terminate_plugins(Host, ServerHost, Plugins, TreePlugin).

View File

@ -41,7 +41,7 @@
start(Host, Opts) ->
HostB = list_to_binary(Host),
IQDisc = gen_mod:get_opt(iqdisc, Opts, one_queue),
mod_disco:register_feature(Host, ?NS_SIC_0_s),
mod_disco:register_feature(HostB, ?NS_SIC_0_s),
gen_iq_handler:add_iq_handler(ejabberd_local, HostB, ?NS_SIC_0_s,
?MODULE, process_local_iq, IQDisc),
gen_iq_handler:add_iq_handler(ejabberd_sm, HostB, ?NS_SIC_0_s,
@ -49,7 +49,7 @@ start(Host, Opts) ->
stop(Host) ->
HostB = list_to_binary(Host),
mod_disco:unregister_feature(Host, ?NS_SIC_0_s),
mod_disco:unregister_feature(HostB, ?NS_SIC_0_s),
gen_iq_handler:remove_iq_handler(ejabberd_local, HostB, ?NS_SIC_0_s),
gen_iq_handler:remove_iq_handler(ejabberd_sm, HostB, ?NS_SIC_0_s).