Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/Remmina/Remmina.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Fortina <marco.fortina@atlantica.it>2022-04-08 15:27:19 +0300
committerMarco Fortina <marco.fortina@atlantica.it>2022-04-08 15:55:39 +0300
commit143caac839efb5677ee020d86a3517986a583724 (patch)
tree0193193475832e7a72f868fa19f0ff0b2d990192
parent48f66a8c83938a23d18b0e1f38b938f107a5d82a (diff)
Call remmina_ssh_close_all_x11_ch also in remmina_ssh_shell_free
-rw-r--r--src/remmina_ssh.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/remmina_ssh.c b/src/remmina_ssh.c
index a2327990d..0ee68a943 100644
--- a/src/remmina_ssh.c
+++ b/src/remmina_ssh.c
@@ -574,14 +574,14 @@ remmina_ssh_close_all_x11_ch(pthread_t thread)
node_t *current = node;
while (current != NULL) {
- if (current->thread == thread) {
+ if (current->thread == thread && !current->protected) {
shutdown(current->fd_in, SHUT_RDWR);
close(current->fd_in);
- REMMINA_DEBUG("fd %d closed.", current->fd_in);
+ REMMINA_DEBUG("thread: %d - fd %d closed.", thread, current->fd_in);
if (current->fd_in != current->fd_out) {
shutdown(current->fd_out, SHUT_RDWR);
close(current->fd_out);
- REMMINA_DEBUG("fd %d closed.", current->fd_out);
+ REMMINA_DEBUG("thread: %d - fd %d closed.", thread, current->fd_out);
}
}
current = current->next;
@@ -3082,6 +3082,9 @@ remmina_ssh_shell_free(RemminaSSHShell *shell)
TRACE_CALL(__func__);
//pthread_t thread = shell->thread;
+ // Close all OPENED X11 channel
+ remmina_ssh_close_all_x11_ch(shell->thread);
+
shell->exit_callback = NULL;
shell->closed = TRUE;
REMMINA_DEBUG("Cancelling the shell thread if needed");