Le jeudi 28 décembre 2006 14:20, Christian Pinedo Zamalloa a écrit :
> hi,

Hello, happy new year to all of you !

> i'm running a freebsd 5.5 server in which i share a printer via
> samba/cups.

Great : I haven't heard before of someone using JASmine on Freebsd, so 
this is great new we may succeed to validate this ;-)

> I have tried to configure JASmine to see the print logs but 
> i obtain an error: "Couldn't lauch the real backend; Return code: -1"

Hmmmm, the real backend doesn't seem to run correctly... First, which 
release of JASmine are you using ? 

Ok, let's look at those logs... :

> jasmine[22935]:   Arguments:
> 20|i2tpizac|smbprn.00000585 Remote Downlevel Document|1| 
> job-uuid=urn:uuid:4d1151ec-51d2-330b-5d47-0a0d40475d38 

These arguments are : $job_id, $user, $title, $copies, $options, $file. We 
can notice that $file is not provided, but we'll see later that this is 
expected...

>Dec 26 18:50:36 bipt02 jasmine[22935]:
> - DEVICE_URI=jasmine:lpd://bipt171.x.y.z

Yes...

> jasmine[22935]:   Called with 5 args, $doc is read from STDIN and the
> tempfile is

"Is" ? Is what ;-) ? I think we found the problem...

> Dec 26 18:50:36 bipt02 jasmine[22935]:   Document: 

Nothing here ? Well, the problem really is identified ;-) !

> Dec 26 18:50:36 bipt02 jasmine[22935]:   Calling backend:
> /usr/local/libexec/cups/backend/lpd lpd://bipt171.x.y.z 20 i2tpizac
> smbprn.00000585 Remote Downlevel Document 1
> job-uuid=urn:uuid:4d1151ec-51d2-330b-5d47-0a0d40475d38

The backend does not receive the file to print, as "expected".

> Dec 26 18:50:36 bipt02 jasmine[22935]:   Real backend returned:
> 72057594037927935

...And seems to be angry.

Ok, here is the code, in JASmine-Backend, that produces the bug :

---------------------------------------------------------------
# If we were called with 5 arguments, read from STDIN to a tempfile:
  if (@ARGV == 5){
    # TODO : This is not portable, use File::Temp instead !
    my $tmpcmd = "/bin/mktemp </dev/null ".$ENV{"TMPDIR"}."/print.XXXXXX";
    $tmpfile = qx{$tmpcmd};
    chomp $tmpfile;
    # TODO : This is not portable too !
    qx{cat > $tmpfile};

    # ...And set $tmpfile to be the document to print
    $doc = $tmpfile;
    log_debug ("  Called with 5 args, \$doc is read from STDIN and the 
tempfile is $doc");
  }
---------------------------------------------------------------

And, as written, it's not portable code : It was going to annoy us sooner 
or later. Ok, so now, I really gonna fix this code, and maybe JASmine 
will run on *bsd ;-) !

I will provide a fix for this issue in the next days. Then, when it works, 
it will be included in release 0.0.4, and I will check all the code for 
other portability issues (Well, those I can find on my own).



One thing to end this mail : The JASmine project is very slow, and you may 
have expected more releases, I'm aware of that. Let's say that between 
work and family, time is sometimes hard to find... So, all code 
contributions are welcome ;-)




-- 
Put JASmine in your Cups !

To unsubscribe :
  mailto:[EMAIL PROTECTED]
List archives :
  http://dir.gmane.org/gmane.comp.printing.jasmine.user
  http://www.mail-archive.com/jasmine%40ml.free.fr/
Web site :
  http://jasmine.berlios.de/



Reply via email to