[X2Go-Commits] [x2goserver] 02/03: x2gocleansessions: Call x2gormforward also on terminated sessions. This will make sure that re-assigned ports are really available on new session startup.
git-admin at x2go.org
git-admin at x2go.org
Fri Oct 17 11:33:46 CEST 2014
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch release/4.0.1.x
in repository x2goserver.
commit fc53bd55382ec39ff44253659d46714df9584c8a
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Fri Oct 17 10:32:15 2014 +0200
x2gocleansessions: Call x2gormforward also on terminated sessions. This will make sure that re-assigned ports are really available on new session startup.
---
debian/changelog | 3 +++
x2goserver/sbin/x2gocleansessions | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 936d33a..9632df3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,6 +23,9 @@ x2goserver (4.0.1.19-0x2go1) UNRELEASED; urgency=medium
- x2gosqlitewrapper.c: Fix rpmlint error: no-return-in-nonvoid-function.
Return the exitcode of execve().
- Fix gramma in error message (in x2goresume-session).
+ - x2gocleansessions: Call x2gormforward also on terminated sessions. This
+ will make sure that re-assigned ports are really available on new session
+ startup.
* debian/control:
+ Add D (x2goserver): libfile-which-perl.
* x2goserver.spec:
diff --git a/x2goserver/sbin/x2gocleansessions b/x2goserver/sbin/x2gocleansessions
index e576e60..b7845e8 100755
--- a/x2goserver/sbin/x2gocleansessions
+++ b/x2goserver/sbin/x2gocleansessions
@@ -213,6 +213,8 @@ elsif ($pid == 0 )
}
syslog('debug', "@sinfo[1]: unmounting all shares");
system( "su", "@sinfo[11]", "-c", "export HOSTNAME && x2goumount-session @sinfo[1]");
+ #remove port forwarding
+ system("su", "@sinfo[11]", "-c", "$x2go_lib_path/x2gormforward @sinfo[1]");
}
elsif (! check_pid (@sinfo[0], at sinfo[1], at sinfo[12]))
{
@@ -265,6 +267,8 @@ elsif ($pid == 0 )
system("su", "@sinfo[11]", "-c", "export HOSTNAME && x2goumount-session @sinfo[1]");
system("su", "@sinfo[11]", "-c", "x2goterminate-session @sinfo[1]");
syslog('debug', "@sinfo[1] has been requested for termination via the session DB");
+ #remove port forwarding
+ system("su", "@sinfo[11]", "-c", "$x2go_lib_path/x2gormforward @sinfo[1]");
}
}
}
--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
More information about the x2go-commits
mailing list