%%%-------------------------------------------------------------------
{deps, [{lager, ".*", {git, "https://github.com/basho/lager", {tag, "3.0.2"}}},
- {p1_utils, ".*", {git, "https://github.com/processone/p1_utils", {tag, "1.0.3"}}},
+ {p1_utils, ".*", {git, "https://github.com/processone/p1_utils", {tag, "1.0.4"}}},
{cache_tab, ".*", {git, "https://github.com/processone/cache_tab", {tag, "1.0.2"}}},
{fast_tls, ".*", {git, "https://github.com/processone/fast_tls", {tag, "1.0.1"}}},
{stringprep, ".*", {git, "https://github.com/processone/stringprep", {tag, "1.0.3"}}},
%% Create the anonymous table if at least one virtual host has anonymous features enabled
%% Register to login / logout events
-record(anonymous, {us = {<<"">>, <<"">>} :: {binary(), binary()},
- sid = {p1_time_compat:timestamp(), self()} :: ejabberd_sm:sid()}).
+ sid = ejabberd_sm:make_sid() :: ejabberd_sm:sid()}).
start(Host) ->
%% TODO: Check cluster mode
xml_socket = XMLSocket, zlib = Zlib, tls = TLS,
tls_required = StartTLSRequired,
tls_enabled = TLSEnabled, tls_options = TLSOpts,
- sid = {p1_time_compat:timestamp(), self()}, streamid = new_id(),
+ sid = ejabberd_sm:make_sid(), streamid = new_id(),
access = Access, shaper = Shaper, ip = IP,
mgmt_state = StreamMgmtState,
mgmt_max_queue = MaxAckQueue,
get_max_user_sessions/2,
get_all_pids/0,
is_existing_resource/3,
- get_commands_spec/0
+ get_commands_spec/0,
+ make_sid/0
]).
-export([init/1, handle_call/3, handle_cast/2,
end, Resources),
length(Resources).
+make_sid() ->
+ {p1_time_compat:unique_timestamp(), self()}.
+
opt_type(sm_db_type) ->
fun (mnesia) -> mnesia;
(internal) -> mnesia;