[glib-networking/mcatanzaro/tls-thread] progress



commit f60a26fc01f5d11bed6d3ff330df5cbafa469c23
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sat Dec 28 17:07:04 2019 -0600

    progress

 tls/base/gtlsoperationsthread-base.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/tls/base/gtlsoperationsthread-base.c b/tls/base/gtlsoperationsthread-base.c
index 4fb7865..0168a13 100644
--- a/tls/base/gtlsoperationsthread-base.c
+++ b/tls/base/gtlsoperationsthread-base.c
@@ -190,7 +190,7 @@ g_tls_operations_thread_base_set_interaction (GTlsOperationsThreadBase *self,
 
   g_mutex_lock (&priv->mutex);
   g_clear_object (&priv->interaction);
-  priv->interaction = g_object_ref (interaction);
+  priv->interaction = interaction? g_object_ref (interaction) : NULL;
   g_mutex_unlock (&priv->mutex);
 }
 
@@ -230,11 +230,14 @@ g_tls_operations_thread_base_request_certificate (GTlsOperationsThreadBase *self
 
   g_mutex_lock (&priv->mutex);
   g_clear_error (&priv->interaction_error);
-  res = g_tls_interaction_invoke_request_certificate (priv->interaction,
-                                                      G_TLS_CONNECTION (priv->connection),
-                                                      0,
-                                                      cancellable,
-                                                      &priv->interaction_error);
+  if (priv->interaction)
+    {
+      res = g_tls_interaction_invoke_request_certificate (priv->interaction,
+                                                          G_TLS_CONNECTION (priv->connection),
+                                                          0,
+                                                          cancellable,
+                                                          &priv->interaction_error);
+    }
   g_mutex_unlock (&priv->mutex);
 
   return res != G_TLS_INTERACTION_FAILED;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]