diff options
author | xengineering <me@xengineering.eu> | 2023-06-30 13:07:12 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2023-06-30 13:07:12 +0200 |
commit | 8b608265772ba5df13d24071117c694bdfd1212a (patch) | |
tree | d78bbd26a438e645c807f6a917b4101d20fe18b1 /xmpp/stream_pair.go | |
parent | 372575cd38a939d1c8f412c8cea653c86bc725df (diff) | |
download | limox-8b608265772ba5df13d24071117c694bdfd1212a.tar limox-8b608265772ba5df13d24071117c694bdfd1212a.tar.zst limox-8b608265772ba5df13d24071117c694bdfd1212a.zip |
Add session pointer to routing infrastructure
It is nearly useless to route a XML element to an appropriate handler
function if the latter has no idea how to send responses to the server
or the GUI. Passing a pointer to the session solves this issue.
Diffstat (limited to 'xmpp/stream_pair.go')
-rw-r--r-- | xmpp/stream_pair.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmpp/stream_pair.go b/xmpp/stream_pair.go index 8f70318..8ec06a6 100644 --- a/xmpp/stream_pair.go +++ b/xmpp/stream_pair.go @@ -28,7 +28,7 @@ func runStreamPair(s *session) { } if buf.isComplete() { element := buf.reset() - route(element, getRoutingTable()) + route(s, element, getRoutingTable()) } } } @@ -91,7 +91,7 @@ func closeStream(s *session) { } } -func streamFeaturesHandler(e []xml.Token) { +func streamFeaturesHandler(s *session, e []xml.Token) { sasl := hasSaslPlain(e) if sasl { log.Println("Stream is compatible with SASL PLAIN mechanism") |