mirror of
https://github.com/processone/ejabberd.git
synced 2025-01-03 18:02:28 +01:00
* src/mod_pubsub/mod_pubsub.erl: Fixed pubsub root node creation
(conflict error was send on node creation) SVN Revision: 529
This commit is contained in:
parent
0e1f86e1f5
commit
49917e284e
@ -1,3 +1,8 @@
|
|||||||
|
2006-04-07 Mickael Remond <mickael.remond@process-one.net>
|
||||||
|
|
||||||
|
* src/mod_pubsub/mod_pubsub.erl: Fixed pubsub root node creation
|
||||||
|
(conflict error was send on node creation)
|
||||||
|
|
||||||
2006-04-07 Alexey Shchepin <alexey@sevcom.net>
|
2006-04-07 Alexey Shchepin <alexey@sevcom.net>
|
||||||
|
|
||||||
* src/ejabberd_sm.erl: SASL Anonymous + Anonymous login support
|
* src/ejabberd_sm.erl: SASL Anonymous + Anonymous login support
|
||||||
|
@ -114,27 +114,26 @@ get_host() ->
|
|||||||
%% {stop, Reason}
|
%% {stop, Reason}
|
||||||
%% Description: Initiates the server
|
%% Description: Initiates the server
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
init([Host, Opts]) ->
|
init([ServerHost, Opts]) ->
|
||||||
mnesia:create_table(pubsub_node,
|
mnesia:create_table(pubsub_node,
|
||||||
[{disc_only_copies, [node()]},
|
[{disc_only_copies, [node()]},
|
||||||
{attributes, record_info(fields, pubsub_node)}]),
|
{attributes, record_info(fields, pubsub_node)}]),
|
||||||
MyHost = gen_mod:get_opt(host, Opts, "pubsub." ++ Host),
|
Host = gen_mod:get_opt(host, Opts, "pubsub." ++ ServerHost),
|
||||||
update_table(MyHost),
|
update_table(Host),
|
||||||
mnesia:add_table_index(pubsub_node, host_parent),
|
mnesia:add_table_index(pubsub_node, host_parent),
|
||||||
ServedHosts = gen_mod:get_opt(served_hosts, Opts, []),
|
ServedHosts = gen_mod:get_opt(served_hosts, Opts, []),
|
||||||
|
|
||||||
|
ejabberd_router:register_route(Host),
|
||||||
ejabberd_router:register_route(MyHost),
|
create_new_node(Host, ["pubsub"], ?MYJID),
|
||||||
create_new_node(MyHost, ["pubsub"], ?MYJID),
|
create_new_node(Host, ["pubsub", "nodes"], ?MYJID),
|
||||||
create_new_node(MyHost, ["pubsub", "nodes"], ?MYJID),
|
create_new_node(Host, ["home"], ?MYJID),
|
||||||
create_new_node(MyHost, ["home"], ?MYJID),
|
create_new_node(Host, ["home", ServerHost], ?MYJID),
|
||||||
create_new_node(MyHost, ["home", Host], ?MYJID),
|
|
||||||
lists:foreach(fun(H) ->
|
lists:foreach(fun(H) ->
|
||||||
create_new_node(MyHost, ["home", H], ?MYJID)
|
create_new_node(Host, ["home", H], ?MYJID)
|
||||||
end, ServedHosts),
|
end, ServedHosts),
|
||||||
ets:new(gen_mod:get_module_proc(MyHost, pubsub_presence),
|
ets:new(gen_mod:get_module_proc(Host, pubsub_presence),
|
||||||
[set, named_table]),
|
[set, named_table]),
|
||||||
{ok, #state{host = MyHost}}.
|
{ok, #state{host = Host}}.
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Function: %% handle_call(Request, From, State) -> {reply, Reply, State} |
|
%% Function: %% handle_call(Request, From, State) -> {reply, Reply, State} |
|
||||||
|
Loading…
Reference in New Issue
Block a user