On Tue, Oct 31, 2000 at 05:50:00PM -0500, Edwin Lim wrote:
[...]
> I think it is the same kind of problem. Do_sync is called after the
> banner page is sent to the printer, and it appears that the printer takes
> more than 20s to print the banner, so Do_sync gives "no response" again.
> Looks like sync_interval and waitend_interval have equivalent functions
> in the Do_* sub, except that sync_interval is 20s and waitend_interval
> is 600s.
>
> I wonder if this problem is peculiar to hp5m alone--that hp5m does not
> answer any queries while it is printing. Anyway...
The strange thing is that it worked with older versions of ifhp.
Do_waitend did not time out after waitend_interval seconds because it
could read printer status information while its new queries where
"on hold", but what kept Do_sync from timing out? Also after
increasing sync_interval to 60 seconds, the problem reportedly
persists, and the printer is not that slow ....
> If you want, you can try this patch to ifhp-3.4.2/src/ifhp.c. It seems
> OK for me in preliminary run, and I _think_ it does what the old version
> of ifhp (around 3.3.17, I went from 3.3.17 to 3.3.21 and it broke there)
> tries to do. Do_Sync/Do_waitend/Read_status_timeout/Write_read_timeout
> have been modified quite a bit in between, so I hope I captured the
> "spirit" of what the code is trying to do 8^)
>
>
> 2701c2701
> < if( len < 0 ) break;
> ---
> > if( len < 0 ) goto again;
> 2886c2886
> < if( len < 0 ) break;
> ---
> > if( len < 0 ) goto again;
> 3114c3114
> < break;
> ---
> > goto again;
This should prevent those incorrect timeouts, but if there really
*was* an error or nothing at all happened, the procedure will continue
anyway ...
As far as Do_waitend is concerned, I think that Write_read_timeout
needs more fine-grained return values so that the caller can
distinguish between the case that Write_read_timeout doesn't get
anything done (which should lead to a timeout after waitend_interval
seconds) and the case that Write_read_timeout writes nothing or only
part of the buffer, but does receive status information from the
printer (which must not lead to the 'no reponse from printer' error).
Maybe such a change also helps for Do_sync, but I'm not sure.
--
Bodo M�ller <[EMAIL PROTECTED]>
PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html
* TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt
* Tel. +49-6151-16-6628, Fax +49-6151-16-6036
-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------