> From [EMAIL PROTECTED] Fri Nov 16 13:11:30 2001 > Date: Fri, 16 Nov 2001 16:11:24 -0500 (EST) > From: Jason Keltz <[EMAIL PROTECTED]> > To: Patrick Powell <[EMAIL PROTECTED]> > Subject: HP 4100 page accounting > > Hi Patrick, > > I'm pretty sure I've found a bug in ifhp that was causing the problems > with the HP 4100 print accounting. > > This morning, I wrote a little tcl script that talked to the 4100 printer, > setting the proper job USTATUS, sending a job, listening for the > responses, and everything was as it should be. > > I then looked at the ifhp code with a coworker and we found the problem. > > In the function pjl_job(), in ifhp.c, there are these two lines: > > len = strlen(buffer); > SNPRINTF(buffer+len, sizeof(buffer)-len) Job_display, Jobname ); > > I believe they are both incorrect. > > First off, buffer has no value up to that point in the function, so why > are you getting its length? > > Also, the SNPRINTF function ends up printing Job_display instead of > Jobstart_str which is definately an error. Here are the definitions of > both of those: > > char *Job_display=" DISPLAY = \"%s\" "; > char *Jobend_str="@PJL EOJ NAME = \"%s\""; > > ... and in fact, a previous ifhp version did have Jobend_str. I checked. > > Why this was working on any of our other printers, I do not know. More > than likely the 4100 is smarter and doesn't like the bad syntax. The > Put_pjl was throwing away the error without commenting on it. > > The two lines should be replaced with just this one: > SNPRINTF(buffer, sizeof(buffer)) Jobstart_str, Jobname ); > > Works for me.. > > Jas. > > >
----------------------------------------------------------------------------- YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST The address you post from MUST be your subscription address 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. -----------------------------------------------------------------------------
