[ostree] fetcher: Fix hung GTlsInteraction
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] fetcher: Fix hung GTlsInteraction
- Date: Tue, 9 Feb 2016 13:13:31 +0000 (UTC)
commit 5adafd767406820cce260c567a1b936610e8d67a
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue Feb 9 00:58:17 2016 +0000
fetcher: Fix hung GTlsInteraction
The GTlsInteraction instance must be created in the session thread
so it uses the correct GMainContext.
src/libostree/ostree-fetcher.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/libostree/ostree-fetcher.c b/src/libostree/ostree-fetcher.c
index 665286c..b922321 100644
--- a/src/libostree/ostree-fetcher.c
+++ b/src/libostree/ostree-fetcher.c
@@ -277,7 +277,12 @@ static void
session_thread_set_tls_interaction_cb (ThreadClosure *thread_closure,
gpointer data)
{
- GTlsInteraction *interaction = data;
+ GTlsCertificate *cert = data;
+ glnx_unref_object OstreeTlsCertInteraction *interaction = NULL;
+
+ /* The GTlsInteraction instance must be created in the
+ * session thread so it uses the correct GMainContext. */
+ interaction = _ostree_tls_cert_interaction_new (cert);
g_object_set (thread_closure->session,
SOUP_SESSION_TLS_INTERACTION,
@@ -645,7 +650,7 @@ _ostree_fetcher_set_client_cert (OstreeFetcher *self,
#ifdef HAVE_LIBSOUP_CLIENT_CERTS
session_thread_idle_add (self->thread_closure,
session_thread_set_tls_interaction_cb,
- _ostree_tls_cert_interaction_new (cert),
+ g_object_ref (cert),
(GDestroyNotify) g_object_unref);
#else
g_warning ("This version of OSTree is compiled without client side certificate support");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]