diff options
author | fiaxh <git@lightrise.org> | 2020-11-16 15:55:33 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2020-11-20 15:21:18 +0100 |
commit | 07917f1d841f449157aa3aaa2507b0547dd274e7 (patch) | |
tree | 315ef3bc243491565d3d5097968dca38d67a7eab /xmpp-vala/src/module/tls.vala | |
parent | 881b9eec9dcd8fd8c81b0b9d7bfd2ae714d7722e (diff) | |
download | dino-07917f1d841f449157aa3aaa2507b0547dd274e7.tar.gz dino-07917f1d841f449157aa3aaa2507b0547dd274e7.zip |
Refactor XmppStream, TLS and connection method logic
fixes #534
Diffstat (limited to 'xmpp-vala/src/module/tls.vala')
-rw-r--r-- | xmpp-vala/src/module/tls.vala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xmpp-vala/src/module/tls.vala b/xmpp-vala/src/module/tls.vala index c3afc4b3..1b8a5411 100644 --- a/xmpp-vala/src/module/tls.vala +++ b/xmpp-vala/src/module/tls.vala @@ -23,10 +23,11 @@ namespace Xmpp.Tls { private void received_nonza(XmppStream stream, StanzaNode node) { if (node.ns_uri == NS_URI && node.name == "proceed") { try { - var io_stream = stream.get_stream(); + StartTlsXmppStream? tls_xmpp_stream = stream as StartTlsXmppStream; + var io_stream = tls_xmpp_stream.get_stream(); if (io_stream == null) return; var conn = TlsClientConnection.new(io_stream, identity); - stream.reset_stream(conn); + tls_xmpp_stream.reset_stream(conn); conn.accept_certificate.connect(on_invalid_certificate); var flag = stream.get_flag(Flag.IDENTITY); |