[glib-networking/mcatanzaro/tls-thread] progress
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking/mcatanzaro/tls-thread] progress
- Date: Sat, 28 Dec 2019 20:29:01 +0000 (UTC)
commit 6ecd77d1ccf29a214b974962c6e91191c13d5311
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sat Dec 28 14:29:04 2019 -0600
progress
tls/base/gtlsoperationsthread-base.c | 2 +-
tls/gnutls/gtlsoperationsthread-gnutls.c | 9 ++++-----
2 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/tls/base/gtlsoperationsthread-base.c b/tls/base/gtlsoperationsthread-base.c
index 5c13e25..4fb7865 100644
--- a/tls/base/gtlsoperationsthread-base.c
+++ b/tls/base/gtlsoperationsthread-base.c
@@ -747,7 +747,7 @@ g_tls_operations_thread_base_handshake (GTlsOperationsThreadBase *self,
handshake_context_free (context);
g_tls_thread_operation_free (op);
- g_object_unref (copied_cert);
+ g_clear_object (&copied_cert);
return status;
}
diff --git a/tls/gnutls/gtlsoperationsthread-gnutls.c b/tls/gnutls/gtlsoperationsthread-gnutls.c
index 319498a..99082fc 100644
--- a/tls/gnutls/gtlsoperationsthread-gnutls.c
+++ b/tls/gnutls/gtlsoperationsthread-gnutls.c
@@ -602,7 +602,7 @@ g_tls_operations_thread_gnutls_handshake (GTlsOperationsThreadBase *base,
gnutls_datum_t protocol;
int ret;
- self->own_certificate = g_steal_pointer (&own_certificate);
+ self->own_certificate = own_certificate;
if (!self->ever_handshaked)
set_handshake_priority (self);
@@ -641,12 +641,11 @@ g_tls_operations_thread_gnutls_handshake (GTlsOperationsThreadBase *base,
END_GNUTLS_IO (self, G_IO_IN | G_IO_OUT, ret, status,
_("Error performing TLS handshake"), error);
+ self->own_certificate = NULL;
self->handshake_context = NULL;
self->handshaking = FALSE;
self->ever_handshaked = TRUE;
- g_clear_object (&self->own_certificate);
-
if (gnutls_alpn_get_selected_protocol (self->session, &protocol) == 0 && protocol.size > 0)
*negotiated_protocol = g_strndup ((gchar *)protocol.data, protocol.size);
else
@@ -1410,7 +1409,7 @@ g_tls_operations_thread_gnutls_set_property (GObject *object,
switch (prop_id)
{
case PROP_BASE_IO_STREAM:
- self->base_iostream = g_value_get_object (value);
+ self->base_iostream = g_value_dup_object (value);
if (self->base_iostream)
{
self->base_istream = g_io_stream_get_input_stream (self->base_iostream);
@@ -1420,7 +1419,7 @@ g_tls_operations_thread_gnutls_set_property (GObject *object,
break;
case PROP_BASE_SOCKET:
- self->base_socket = g_value_get_object (value);
+ self->base_socket = g_value_dup_object (value);
if (self->base_socket)
g_assert (!self->base_iostream);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]