session.type = "component";
module:log("info", "External component successfully authenticated");
session.send(st.stanza("handshake"));
-
+
return true;
end
- module:hook("stanza/jabber:component:accept:handshake", handle_component_auth);
+ module:hook("stanza/jabber:component:accept:handshake", handle_component_auth, -1);
-- Handle stanzas addressed to this component
local function handle_stanza(event)
session.log = logger.init(conn_name);
session.close = session_close;
-
+ if opt_keepalives then
+ conn:setoption("keepalive", opt_keepalives);
+ end
++
session.log("info", "Incoming Jabber component connection");
-
+
local stream = new_xmpp_stream(session, stream_callbacks);
session.stream = stream;
-
+
session.notopen = true;
-
+
function session.reset_stream()
session.notopen = true;
session.stream:reset();