[X2Go-Commits] [libx2goclient] 22/132: src/x2goclient-network-ssh.c: "unreference" check thread pointer in x2goclient_network_ssh_check_timeout_thread_main ().
git-admin at x2go.org
git-admin at x2go.org
Fri Dec 3 15:26:29 CET 2021
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository libx2goclient.
commit b59db11fb259eafb3fe58070577e9d48de6bf761
Author: Mihai Moldovan <ionic at ionic.de>
Date: Sat Feb 27 09:23:51 2021 +0100
src/x2goclient-network-ssh.c: "unreference" check thread pointer in x2goclient_network_ssh_check_timeout_thread_main ().
We want to invalidate the instance variable if the thread finishes and
if this function terminates, it means that the check thread will
terminate right after the fact.
---
src/x2goclient-network-ssh.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/x2goclient-network-ssh.c b/src/x2goclient-network-ssh.c
index 348f712..024e728 100644
--- a/src/x2goclient-network-ssh.c
+++ b/src/x2goclient-network-ssh.c
@@ -1570,6 +1570,15 @@ static gpointer x2goclient_network_ssh_check_timeout_thread_main (const gpointer
/* Destroy context. */
g_main_context_unref (self->check_thread_context);
self->check_thread_context = NULL;
+
+ /*
+ * "Un-reference" the thread pointer.
+ *
+ * FIXME: is that safe here? The general idea is that, if this function
+ * terminates, the thread will be torn down as well, so it should be
+ * pretty safe.
+ */
+ self->check_thread = NULL;
g_mutex_unlock (&(self->check_thread_mutex));
g_log (NULL, G_LOG_LEVEL_DEBUG, "Terminating main function of check timeout thread.");
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
More information about the x2go-commits
mailing list