I've run into this problem several times before... it seems to relate to
the sizes of the variables that are declared in lp5250d.c
For example, if your "output command" is more than 30 chars long, it will
cause problems because lp5250d only allocates 30 bytes to store it in.
When the system goes to actually print something, it does a popen() to
that output command, which causes it to assert or even segmentation fault.
"scs2ascii | lpr -Plinuxoptra"
123456789012345678901234567890
This is cutting it close, but doesnt appear to overflow. Is that the
string your using, or is it a bit more complex?
Also, the same problem exists with the hostname (20 chars), the
session name (20 chars -- tho 10 is the AS/400's max so this shouldnt be
too big of an issue), and the logfile's name (20 chars).
Perhaps these parameters should be allocated with malloc(), based on
the size of the arguments, so that we don't have this type of overflow?
I could write up a patch if you'd like...
Hope that helps...
On Wed, 3 May 2000, Mike wrote:
> to work. The command prompt when issued creates the device, goes active, but the
>moment a stored print job in the queue is released the connection drops with a
>'hardware error msg' on the qsysopr msgs and the connection is lost.
>
> I can do a test print from printtool successfully and I can do a | to lpr
>-Plinuxoptra successfully, but I can no longer get a test print from the AS400. The
>device will stay active if there is an alignment msg generated, until I answer the
>msg.
>
> The only thing I did over the weekend was to try to make up some X desktop icons to
>call the lp5250d program from the desktop, but I"m back to trying the command line
>approach now, since none of them would work.
>
> Thanks
>
> Mike
>
+---
| This is the LINUX5250 Mailing List!
| To submit a new message, send your mail to [EMAIL PROTECTED]
| To subscribe to this list send email to [EMAIL PROTECTED]
| To unsubscribe from this list send email to [EMAIL PROTECTED]
| Questions should be directed to the list owner/operator: [EMAIL PROTECTED]
+---