core/s2smanager.lua

changeset 1936
a6ca0dcc7b83
parent 1930
92b78dd346ca
child 1962
3e7231c6d6a9
equal deleted inserted replaced
1935:05adeddf9f1b 1936:a6ca0dcc7b83
364 session:close({ condition = "host-unknown"; text = "This host does not serve "..session.to_host }); 364 session:close({ condition = "host-unknown"; text = "This host does not serve "..session.to_host });
365 return; 365 return;
366 end 366 end
367 if session.version >= 1.0 then 367 if session.version >= 1.0 then
368 local features = st.stanza("stream:features"); 368 local features = st.stanza("stream:features");
369 fire_event("s2s-stream-features", session, features); 369
370 if session.to_host then
371 hosts[session.to_host].events.fire_event("s2s-stream-features", { session = session, features = features });
372 else
373 (session.log or log)("warn", "No 'to' on stream header from %s means we can't offer any features", session.from_host or "unknown host");
374 end
370 375
371 log("debug", "Sending stream features: %s", tostring(features)); 376 log("debug", "Sending stream features: %s", tostring(features));
372 send(features); 377 send(features);
373 end 378 end
374 elseif session.direction == "outgoing" then 379 elseif session.direction == "outgoing" then

mercurial