aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/core/starttls_xmpp_stream.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2020-12-31 23:19:06 +0100
committerfiaxh <git@lightrise.org>2020-12-31 23:19:06 +0100
commit2c22c0428cb53252930d52e6327f14a6fcc8cf03 (patch)
treea282774719bd346c47df955b7b35b7754fbf130d /xmpp-vala/src/core/starttls_xmpp_stream.vala
parentc7b242a72e411f54192ae74f0bebaf090c4dc17a (diff)
downloaddino-2c22c0428cb53252930d52e6327f14a6fcc8cf03.tar.gz
dino-2c22c0428cb53252930d52e6327f14a6fcc8cf03.zip
Fix segfault on accept_certificate signal (fixup 81a5505)
Diffstat (limited to 'xmpp-vala/src/core/starttls_xmpp_stream.vala')
-rw-r--r--xmpp-vala/src/core/starttls_xmpp_stream.vala6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmpp-vala/src/core/starttls_xmpp_stream.vala b/xmpp-vala/src/core/starttls_xmpp_stream.vala
index 401d7295..1e4f7954 100644
--- a/xmpp-vala/src/core/starttls_xmpp_stream.vala
+++ b/xmpp-vala/src/core/starttls_xmpp_stream.vala
@@ -6,11 +6,11 @@ public class Xmpp.StartTlsXmppStream : TlsXmppStream {
uint16 port;
TlsXmppStream.OnInvalidCert on_invalid_cert_outer;
- public StartTlsXmppStream(Jid remote, string host, uint16 port, TlsXmppStream.OnInvalidCert on_invalid_cert) {
+ public StartTlsXmppStream(Jid remote, string host, uint16 port, owned TlsXmppStream.OnInvalidCert on_invalid_cert) {
base(remote);
this.host = host;
this.port = port;
- this.on_invalid_cert_outer = on_invalid_cert;
+ this.on_invalid_cert_outer = (owned)on_invalid_cert;
}
public override async void connect() throws IOStreamError {
@@ -42,7 +42,7 @@ public class Xmpp.StartTlsXmppStream : TlsXmppStream {
reset_stream(conn);
conn.accept_certificate.connect(on_invalid_certificate);
- conn.accept_certificate.connect(on_invalid_cert_outer);
+ conn.accept_certificate.connect((cert, flags) => on_invalid_cert_outer(cert, flags));
} catch (Error e) {
stderr.printf("Failed to start TLS: %s\n", e.message);
}