65 end |
65 end |
66 end |
66 end |
67 |
67 |
68 function stream_callbacks.streamopened(session, attr) |
68 function stream_callbacks.streamopened(session, attr) |
69 if config.get(attr.to, "core", "component_module") ~= "component" then |
69 if config.get(attr.to, "core", "component_module") ~= "component" then |
70 -- Trying to act as a component domain which |
70 -- Trying to act as a component domain which |
71 -- hasn't been configured |
71 -- hasn't been configured |
72 session:close{ condition = "host-unknown", text = tostring(attr.to).." does not match any configured external components" }; |
72 session:close{ condition = "host-unknown", text = tostring(attr.to).." does not match any configured external components" }; |
73 return; |
73 return; |
74 end |
74 end |
75 |
75 |
76 -- Note that we don't create the internal component |
76 -- Note that we don't create the internal component |
77 -- until after the external component auths successfully |
77 -- until after the external component auths successfully |
78 |
78 |
79 session.host = attr.to; |
79 session.host = attr.to; |
80 session.streamid = uuid_gen(); |
80 session.streamid = uuid_gen(); |
81 session.notopen = nil; |
81 session.notopen = nil; |