Software /
code /
prosody
Comparison
core/s2smanager.lua @ 3948:d0b8fa486458
s2smanager: session.send(): Return the result of send_to_host() (and incidentally make this a tail call \o/)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 22 Dec 2010 20:39:30 +0000 |
parent | 3947:21391aa2d9bc |
child | 3950:27947d66b814 |
comparison
equal
deleted
inserted
replaced
3947:21391aa2d9bc | 3948:d0b8fa486458 |
---|---|
553 local from, to = session.from_host, session.to_host; | 553 local from, to = session.from_host, session.to_host; |
554 | 554 |
555 session.log("info", session.direction.." s2s connection "..from.."->"..to.." complete"); | 555 session.log("info", session.direction.." s2s connection "..from.."->"..to.." complete"); |
556 | 556 |
557 local send_to_host = send_to_host; | 557 local send_to_host = send_to_host; |
558 function session.send(data) send_to_host(to, from, data); end | 558 function session.send(data) return send_to_host(to, from, data); end |
559 | 559 |
560 local event_data = { session = session }; | 560 local event_data = { session = session }; |
561 if session.type == "s2sout" then | 561 if session.type == "s2sout" then |
562 prosody.events.fire_event("s2sout-established", event_data); | 562 prosody.events.fire_event("s2sout-established", event_data); |
563 hosts[session.from_host].events.fire_event("s2sout-established", event_data); | 563 hosts[session.from_host].events.fire_event("s2sout-established", event_data); |