× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Working lp5250d last week, now refuses
  • From: Scott Klement <klemscot@xxxxxxxxxxxx>
  • Date: Wed, 3 May 2000 14:51:13 -0500 (CDT)

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 LINUX5250@midrange.com.
| To subscribe to this list send email to LINUX5250-SUB@midrange.com.
| To unsubscribe from this list send email to LINUX5250-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.