[X2go-Commits] x2goserver.git - master (branch) updated: 3.0.99-2-278-g673a590

X2go dev team git-admin at x2go.org
Fri Sep 23 12:07:17 CEST 2011


The branch, master has been updated
       via  673a59080876b2a5a782cd936dd4e268f97fbd02 (commit)
      from  cea2b3cb96b8a0ab8ca52d8b1751c481b64e75f5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 673a59080876b2a5a782cd936dd4e268f97fbd02
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Sep 23 12:06:57 2011 +0200

    If resuming or suspending of a session fails, mark the session has finished (because the session's x2goagent is very probably dead). Do not write an error to stderr if x2goterminate-session fails (i.e. if x2goagent is dead).

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog                     |    3 +++
 x2goserver/bin/x2goresume-session    |    4 ++++
 x2goserver/bin/x2gosuspend-session   |    4 ++++
 x2goserver/bin/x2goterminate-session |    5 ++++-
 4 files changed, 15 insertions(+), 1 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 1a13e68..9f34f37 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -68,6 +68,9 @@ x2goserver (3.0.99.5-0~x2go3) UNRELEASED; urgency=low
   * Let db_insertmount create a proper return value (success vs. failed).
   * Improvement of man pages.
   * Add return value information of X2go commands to man pages.
+  * If resuming or suspending of a session fails, mark the session has finished
+    (because the session's x2goagent is very probably dead). Do not write
+    an error to stderr if x2goterminate-session fails (i.e. if x2goagent is dead).
 
   [ Ivan Kabaivanov ]
   * Makefile fix around man page installation in x2goserver-compat package.
diff --git a/x2goserver/bin/x2goresume-session b/x2goserver/bin/x2goresume-session
index 85d43a9..5fa453a 100755
--- a/x2goserver/bin/x2goresume-session
+++ b/x2goserver/bin/x2goresume-session
@@ -89,4 +89,8 @@ kill -HUP $X2GO_AGENT_PID &>/dev/null && {
 	err_msg="ERROR: failed to resume session with ID $SESSION_NAME"
 	echo "$err_msg" 1>&2
 	$X2GO_LIB_PATH/x2gosyslog "$0" "err" "$err_msg"
+
+	# If we reach here it means that the x2goagent process of the session has vanisshed
+	# If this happens than we mark the session as finished...
+	$X2GO_LIB_PATH/x2gochangestatus 'F' $SESSION_NAME  > /dev/null
 }
diff --git a/x2goserver/bin/x2gosuspend-session b/x2goserver/bin/x2gosuspend-session
index 7cc70c5..973edc9 100755
--- a/x2goserver/bin/x2gosuspend-session
+++ b/x2goserver/bin/x2gosuspend-session
@@ -44,6 +44,10 @@ kill -HUP $X2GO_AGENT_PID &>/dev/null && {
 	err_msg="ERROR: failed to suspend session with ID $SESSION_NAME"
 	echo "$err_msg" 1>&2
 	$X2GO_LIB_PATH/x2gosyslog "$0" "err" "$err_msg"
+
+	# If we reach here it means that the x2goagent process of the session has vanisshed
+	# If this happens than we mark the session as finished...
+	$X2GO_LIB_PATH/x2gochangestatus 'F' $SESSION_NAME  > /dev/null
 }
 
 export HOSTNAME 
diff --git a/x2goserver/bin/x2goterminate-session b/x2goserver/bin/x2goterminate-session
index bc84950..bcd1f9f 100755
--- a/x2goserver/bin/x2goterminate-session
+++ b/x2goserver/bin/x2goterminate-session
@@ -39,7 +39,10 @@ kill -TERM $X2GO_AGENT_PID &>/dev/null && {
 	$X2GO_LIB_PATH/x2gosyslog "$0" "notice" "session with ID $SESSION_NAME has been terminated successfully"
 } || {
 	err_msg="ERROR: failed to terminate session with ID $SESSION_NAME"
-	echo "$err_msg" 1>&2
+
+	# some x2goclient versions behave weirdly if we give an error message here, so we only write syslog for now...
+	#echo "$err_msg" 1>&2
+
 	$X2GO_LIB_PATH/x2gosyslog "$0" "err" "$err_msg"
 }
 


hooks/post-receive
-- 
x2goserver.git (X2go Server)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2goserver.git" (X2go Server).




More information about the x2go-commits mailing list