[X2go-Commits] cups-x2go.git - master (branch) updated: 3.0.0.2-22-g3c6993f

X2go dev team git-admin at x2go.org
Fri Sep 9 09:10:59 CEST 2011


The branch, master has been updated
       via  3c6993f6a0afa679bfdf4c5a0d3375f4284db81d (commit)
      from  698c43d6d21dfed60db3e70fcb8a987e8514f103 (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 3c6993f6a0afa679bfdf4c5a0d3375f4284db81d
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Sep 9 09:12:01 2011 +0200

    Fix remote printing, use host specified in X2go session information for destination of print jobs, not the host specified in cups-x2go.conf.

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

Summary of changes:
 cups-x2go        |   24 +++++++++---------------
 debian/changelog |    2 ++
 2 files changed, 11 insertions(+), 15 deletions(-)

The diff of changes is:
diff --git a/cups-x2go b/cups-x2go
index 1a10aaa..0b24ff6 100755
--- a/cups-x2go
+++ b/cups-x2go
@@ -47,7 +47,7 @@ my $cfgfile="/etc/cups/cups-x2go.conf";
 
 my $userName;
 my @sessions;
-my $host=hostname();
+my $this_host=hostname();
 
 sub readconfig
 {
@@ -112,9 +112,9 @@ sub getsessions
 
 sub printfile
 {
-	my ($pfile,$tfile,$phost, $sess)=@_;
+	my ($pfile,$tfile,$x2gosession_host, $sess)=@_;
 	my $bname=basename($pfile);
-	if($phost eq $host)
+	if($x2gosession_host eq $this_host)
 	{
 		my ($tm,$tm,$uid,$gid,$tm,$tm,$tm,$spooldir)=getpwnam("x2goprint");
 		my $spfile="$spooldir/${sess}_$bname";
@@ -133,21 +133,15 @@ sub printfile
 	{
 		# push spool job to remote X2go server... and launch x2goprint there (with sudo!!!)
 
-		# FIXME: probably the $phost contains the value for the remote x2goserver...
-                #        $x2goserver is read from config, it doesn't make sense here that the
-                #        X2go server is statically taken from the config file, it should be 
-                #        taken from the session information hash (i.e. = $phost).
-                #        If that is so, then $phost is not an appropriate var name...
-
 		# PDF file
-		syslog('debug', "scp -i $printdsa $pfile x2goprint\@$x2goserver:~x2goprint/${sess}_$bname");
-		system ("scp -i $printdsa $pfile x2goprint\@$x2goserver:~x2goprint/${sess}_$bname");
+		syslog('debug', "scp -i $printdsa $pfile x2goprint\@$x2gosession_host:~x2goprint/${sess}_$bname");
+		system ("scp -i $printdsa $pfile x2goprint\@$x2gosession_host:~x2goprint/${sess}_$bname");
 		# title file
-		syslog('debug', "scp -i $printdsa $tfile x2goprint\@$x2goserver:~x2goprint/${sess}_$bname.title");
-		system ("scp -i $printdsa $tfile x2goprint\@$x2goserver:~x2goprint/${sess}_$bname.title");
+		syslog('debug', "scp -i $printdsa $tfile x2goprint\@$x2gosession_host:~x2goprint/${sess}_$bname.title");
+		system ("scp -i $printdsa $tfile x2goprint\@$x2gosession_host:~x2goprint/${sess}_$bname.title");
 		# run x2goprint on remote X2go server
-		syslog('debug', "ssh -i $printdsa  x2goprint\@$x2goserver \"sudo x2goprint $userName $sess ${sess}_$bname ${sess}_$bname.title\"" );
-		system( "ssh -i $printdsa  x2goprint\@$x2goserver \"sudo x2goprint $userName $sess ${sess}_$bname ${sess}_$bname.title\"" );
+		syslog('debug', "ssh -i $printdsa  x2goprint\@$x2gosession_host \"sudo x2goprint $userName $sess ${sess}_$bname ${sess}_$bname.title\"" );
+		system( "ssh -i $printdsa  x2goprint\@$x2gosession_host \"sudo x2goprint $userName $sess ${sess}_$bname ${sess}_$bname.title\"" );
 
 	}
 }
diff --git a/debian/changelog b/debian/changelog
index b4a668a..e732607 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,8 @@ cups-x2go (3.0.0.2-0~x2go2) UNRELEASED; urgency=low
     server share the same machine.
   * Add a proper dpkg-statoverride check in postinst script.
   * Major change of code, add comments, syslogging, fix ghostscript call.
+  * Fix remote printing, use host specified in X2go session information for
+    destination of print jobs, not the host specified in cups-x2go.conf.
 
   [ Mario Oroz ]
   * Add syslog support for cups-x2go.


hooks/post-receive
-- 
cups-x2go.git (CUPS Backend for X2go Printing)

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 "cups-x2go.git" (CUPS Backend for X2go Printing).




More information about the x2go-commits mailing list