[X2Go-Commits] [x2goserver] 01/01: x2goserver/lib/x2goistrue: use shift unconditionally and check the parameter to be defined instead.

git-admin at x2go.org git-admin at x2go.org
Tue Jan 16 11:01:23 CET 2018


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2goserver.

commit c384352165f68758edd4ce91f9b42357021df418
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Tue Jan 16 11:00:37 2018 +0100

    x2goserver/lib/x2goistrue: use shift unconditionally and check the parameter to be defined instead.
---
 debian/changelog          | 2 ++
 x2goserver/lib/x2goistrue | 8 +++-----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 631106c..13d9c6f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -235,6 +235,8 @@ x2goserver (4.1.0.0-0x2go1.2) UNRELEASED; urgency=low
       integer.
     - x2goserver/lib/x2goistrue: perl strips empty parameters from @ARGV, so
       work around that gracefully.
+    - x2goserver/lib/x2goistrue: use shift unconditionally and check the
+      parameter to be defined instead.
   * x2goserver.spec:
     - Only create session DB in x2goserver's post install script. Do use
       proper Requires(post) statements to make sure perl-X2Go-Server-DB and
diff --git a/x2goserver/lib/x2goistrue b/x2goserver/lib/x2goistrue
index b260fe5..5978436 100755
--- a/x2goserver/lib/x2goistrue
+++ b/x2goserver/lib/x2goistrue
@@ -21,15 +21,13 @@ use strict;
 
 use X2Go::Utils qw (is_true);
 
-my $value = "";
+my $value = shift;
 
-if (@ARGV) {
-  $value = shift;
-else {
+if (!(defined ($value))) {
   print STDERR "No value passed in, assuming empty string.";
+  $value = "";
 }
 
-
 print is_true ($value) . "\n";
 
 exit 0;

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goserver.git


More information about the x2go-commits mailing list