Mr. Edwin Lim <[EMAIL PROTECTED]> now has the 'Clever Inight Award'.
How right you are (see below for his original suggestion:):
Try:
if( Outlen ){
len = Write_read_timeout( Outlen, Outbuf, timeout );
Init_outbuf();
} else {
len = Read_status_timeout( timeout );
}
DEBUG3("Do_waitend: len %d", len );
X if( len < 0 ){
X /* we have an error - timeout */
X break;
X } else {
X /* we have something back, so we are happy */
X time( &interval_t );
X time( &start_t );
X }
Lets see what this does:
If Outlen > 0, then we use the 'Write_read_timeout'.
This will do a select() on the output, and if there
is pending input, return a positive value.
So len >= 0, and we will reset the timers...
If Outlen == 0, we use Read_status_timeout.
If it DID read some status then it returns
a positive value. If it gets EOF or times out,
it returns -1.
So this might/should/hopefully fix the problem.
Could you please try this?
Sigh...
> From [EMAIL PROTECTED] Mon Oct 30 09:24:24 2000
> Date: Mon, 30 Oct 2000 10:20:20 -0500
> From: Edwin Lim <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: LPRng: Re: waitend_interval weirdness?
>
> Just an update w.r.t ifhp-3.4.2:
>
> Checked out ifhp-3.4.2, but it looks like the symptoms are still around.
> The relevant line of code change (in ifhp.c, in Do_waitend()):
>
> if( len ) break;
>
> changed to:
>
> if( len < 0 ) break;
>
> Still does not fix the waitend/waitend_interval problem. "len" has been
> set to -1 by Write_read_timeout() after "waitend_interval" has elapsed.
> So, either "if" conditions produces the same result.
>
> It seems to me that the quickest fixes are:
>
> 1) Infinite loop until printer responds with what we are looking for:
>
> if( len < 0 ) goto again;
>
> 2) Reset "timeout" to "waitend_interval" every time something is received
> from the printer. This will JFAIL only after "waitend_interval" has
> elapsed _without_ any response from the printer (e.g., pagecount
> updates).
See above, good idea!
>
>
> Cheers,
> Edwin Lim <[EMAIL PROTECTED]> 973-360-7058 fp c254 ----------------
-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------