> From [EMAIL PROTECTED] Thu Jun 22 16:37:50 2000
> To: [EMAIL PROTECTED]
> Subject: LPRng: ifhp/Phaser850 works on one host but not another
> Date: Thu, 22 Jun 2000 15:24:58 -0700
> From: Steve Lumos <[EMAIL PROTECTED]>
>
>
> [Sorry if you are seeing this for a second time.  As far as I can tell
> it was never delivered, but it didn't bounce either.]
>
> OK I'm lost.  I'm trying to move printing from one host to another.
>
>   - Host 1 (WORKS): NetBSD 1.4.1/SPARC running on a SS10
>   - Host 2 (BREAKS): NetBSD 1.4.1/i386 running on a Pentium II system
>
> Both are running the version of the same OS.  Identical versions of
> ifhp (3.3.9).  Identical ifhp.conf, printcap, etc.  Both machines are
> on the same net which is also the same as the printer.
>
> If I run: 
>
>    ./ifhp -Tdev=131.216.20.5%9100,model=phaser850,appsocket,trace,debug=2 
>           <showpage.ps
>
> the output is identical except for two differences.
>
> Where Host 1 says:
>
>  ifhp 16:26:40.396 [19689] Process_job: sending job file
>  ifhp 16:26:40.396 [19689] Init_outbuf: Outbuf 0x23000, Outmax 10240, Outlen 0
>  ifhp 16:26:40.397 [19689] Send_job: starting transfer
>  ifhp 16:26:40.397 [19689] Send_job: want 256
>  ifhp 16:26:40.398 [19689] Send_job: read 14 from stdin
>  ifhp 16:26:40.399 [19689] Send_job: initial job type 'POSTSCRIPT'
>  ifhp 16:26:40.399 [19689] Send_job: final job type 'POSTSCRIPT'
>  ifhp 16:26:40.400 [19689] Send_job: job identified as 'POSTSCRIPT', converter 
>'<NULL>'

Hmmm... here is the source code: IFHP/src/ifhp.c, line 2962 - 
(and excerts from ifhp.h):

#define ISNULL(X) ((X==0) || ((cval(X))==0))
#define cval(x) (int)(*(unsigned char *)(x))
if( !ISNULL( pgm ) ){
        LOGMSG( "Send_job: job type '%s', converter '%s'",
            language, pgm );


I am baffled.  How can you get "converter '<NULL>'" out here?  This is the same
as doing (I hope):


if( !((pgm == 0) || ((int)(*(unsigned char *)(pgm)) == 0 )) ){
        LOGMSG( "Send_job: job type '%s', converter '%s'",
            language, pgm );

        Note that the 'LOGMSG' calls SNPRINTF which prints the
        0 (NULL) pointer value as '<NULL>'.
}

I don't have a machine to test this with,  but I would be REALLY REALLY
interested to see if you could try:

if( pgm == 0 || *pgm == 0 ){
        LOGMSG( "Send_job: job type '%s', converter '%s'",
            language, pgm );


and see if you get the same result,  and then keep putting things
back in until you find the thing that causes the difference.


>  ifhp 16:26:40.401 [19689] Send_job: Outbuf after type and stripping '%!PS showpage'
>
> Host 2 says:
>
>  ifhp 16:27:38.330 [15891] Process_job: sending job file
>  ifhp 16:27:38.330 [15891] Init_outbuf: Outbuf 0x1e000, Outmax 10240, Outlen 0
>  ifhp 16:27:38.330 [15891] Send_job: starting transfer
>  ifhp 16:27:38.330 [15891] Send_job: want 256
>  ifhp 16:27:38.331 [15891] Send_job: read 14 from stdin
>  ifhp 16:27:38.331 [15891] Send_job: initial job type 'POSTSCRIPT'
>  ifhp 16:27:38.331 [15891] Send_job: final job type 'POSTSCRIPT'
>  ifhp 16:27:38.331 [15891] Send_job: job identified as 'POSTSCRIPT'
>  ifhp 16:27:38.331 [15891] Send_job: Outbuf after type and stripping '%!PS showpage'
>
> (only difference is the absence of "converter '<NULL>'")
>
> And where Host 1 says:
>
>  ifhp 16:26:40.424 [19689] Process_job: end sync and pagecount
>  ifhp 16:26:40.425 [19689] Do_waitend: Appsocket device close
>  ifhp 16:26:40.425 [19689] Do_waitend: getting end using 'appsocket'
>  ifhp 16:26:40.426 [19689] Do_waitend: input fd 1, output fd 6, monitor fd 6
>  ifhp 16:26:40.427 [19689] Init_outbuf: Outbuf 0x23000, Outmax 10240, Outlen 0
>  ifhp 16:26:40.429 [19689] Read_monitor_status_line: read fd 6, count 13, 'status: 
>idle'
>  ifhp 16:26:40.430 [19689] Check_device_status: status = 'idle'
>  ifhp 16:26:43.982 [19689] Read_status_line: read fd 1, count 0, ''
>  ifhp 16:26:43.983 [19689] Do_accounting: accounting at end, pagecount 0, pages 0
>  ifhp 16:26:43.984 [19689] Accounting: script '<NULL>', fd 3, Accountfile '<NULL>', 
>output 'end '-b0' '-T3' '-q19689' '-p0' '-t2000-06-20-16:26:43.983' 
>'-Tdev=131.216.20.5%9100,model=phaser850,appsocket,trace,debug=2''
>  ifhp 16:26:43.984 [19689] Accounting: writing to 3, 'end '-b0' '-T3' '-q19689' 
>'-p0' '-t2000-06-20-16:26:43.983' 
>'-Tdev=131.216.20.5%9100,model=phaser850,appsocket,trace,debug=2''
>  ifhp 16:26:43.986 [19689] Process_job: done
>
> Host 2 says:
>
>  ifhp 16:27:38.333 [15891] Process_job: end sync and pagecount
>  ifhp 16:27:38.333 [15891] Do_waitend: Appsocket device close
>  ifhp 16:27:38.333 [15891] Do_waitend: getting end using 'appsocket'
>  ifhp 16:27:38.333 [15891] Do_waitend: input fd 1, output fd 6, monitor fd 6
>  ifhp 16:27:38.333 [15891] Init_outbuf: Outbuf 0x1e000, Outmax 10240, Outlen 0
>  ifhp 16:27:38.335 [15891] Read_monitor_status_line: read fd 6, count 13, 'status: 
>idle'
>  ifhp 16:27:38.335 [15891] Check_device_status: status = 'idle'
>  ifhp 16:27:40.827 [15891] Read_status_line: read fd 1, count 0, ''
>  ifhp 16:27:40.827 [15891] Read_status_line: read fd 1, count 0, ''
>  ifhp 16:27:40.827 [15891] Read_status_line: read fd 1, count 0, ''
>
>                              [. . .]
>

-----------------------------------------------------------------------------
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------

Reply via email to