From e8c162eae3827a4f2abdf97b1e42f7398744c10e Mon Sep 17 00:00:00 2001 From: fiaxh Date: Tue, 12 Oct 2021 16:26:50 +0200 Subject: Fix misc compiler warnings --- xmpp-vala/src/core/direct_tls_xmpp_stream.vala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xmpp-vala/src/core') diff --git a/xmpp-vala/src/core/direct_tls_xmpp_stream.vala b/xmpp-vala/src/core/direct_tls_xmpp_stream.vala index 43b7114a..ee796350 100644 --- a/xmpp-vala/src/core/direct_tls_xmpp_stream.vala +++ b/xmpp-vala/src/core/direct_tls_xmpp_stream.vala @@ -1,5 +1,7 @@ public class Xmpp.DirectTlsXmppStream : TlsXmppStream { + const string[] ADVERTISED_PROTOCOLS = {"xmpp-client"}; + string host; uint16 port; TlsXmppStream.OnInvalidCertWrapper on_invalid_cert; @@ -18,7 +20,7 @@ public class Xmpp.DirectTlsXmppStream : TlsXmppStream { IOStream? io_stream = yield client.connect_to_host_async(host, port); TlsConnection tls_connection = TlsClientConnection.new(io_stream, new NetworkAddress(remote_name.to_string(), port)); #if ALPN_SUPPORT - tls_connection.set_advertised_protocols(new string[]{"xmpp-client"}); + tls_connection.set_advertised_protocols(ADVERTISED_PROTOCOLS); #endif tls_connection.accept_certificate.connect(on_invalid_certificate); tls_connection.accept_certificate.connect((cert, flags) => on_invalid_cert.func(cert, flags)); -- cgit v1.2.3-70-g09d2