diff options
author | xengineering <me@xengineering.eu> | 2023-07-04 12:33:12 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2023-07-04 12:35:49 +0200 |
commit | 9f87ef34c589825d65824a8c9210fed5bf92f94d (patch) | |
tree | 778c7972b8e3bf137581780343b6bf7f5ba1b286 | |
parent | 5932556e7051690e262a5ee39263b7905bf1ba20 (diff) | |
download | limox-9f87ef34c589825d65824a8c9210fed5bf92f94d.tar limox-9f87ef34c589825d65824a8c9210fed5bf92f94d.tar.zst limox-9f87ef34c589825d65824a8c9210fed5bf92f94d.zip |
Remove runStreamPair()
This will not be used in the new RX concept.
-rw-r--r-- | xmpp/sasl.go | 1 | ||||
-rw-r--r-- | xmpp/session.go | 2 | ||||
-rw-r--r-- | xmpp/streams.go | 29 |
3 files changed, 0 insertions, 32 deletions
diff --git a/xmpp/sasl.go b/xmpp/sasl.go index 0c13f36..a20ae56 100644 --- a/xmpp/sasl.go +++ b/xmpp/sasl.go @@ -60,7 +60,6 @@ func hasSaslPlain(e []xml.Token) bool { } func saslSuccessHandler(s *session, e []xml.Token) { - runStreamPair(s) } func saslFailureHandler(s *session, e []xml.Token) { diff --git a/xmpp/session.go b/xmpp/session.go index 6a5e646..f18fd2a 100644 --- a/xmpp/session.go +++ b/xmpp/session.go @@ -57,8 +57,6 @@ func (s *session) run() { s.tx = xml.NewEncoder(w) s.out <- SessionConnect{} - - runStreamPair(s) } func (s *session) startTransport() error { diff --git a/xmpp/streams.go b/xmpp/streams.go index 5ba4c1d..388be4d 100644 --- a/xmpp/streams.go +++ b/xmpp/streams.go @@ -5,35 +5,6 @@ import ( "log" ) -func runStreamPair(s *session) { - end := openStream(s) - defer closeStream(s, end) - - buf := newElementBuffer() - - for { - select { - case data := <-s.in: - switch data.(type) { - case SessionShouldDisconnect: - return - default: - log.Printf("Unknown data '%d'!\n", data) - } - case t := <-s.rx: - err := buf.add(t) - if err != nil { - log.Printf("Could not add XML token to buffer: %v\n", err) - return - } - if buf.isComplete() { - element := buf.reset() - route(s, element, getRoutingTable()) - } - } - } -} - func openStream(s *session) xml.EndElement { start := xml.StartElement{ xml.Name{"jabber:client", "stream:stream"}, |