I have been staring at some information provided by [EMAIL PROTECTED]
where he states that in a TCP/IP trace he discovered a RST packet
being gratuitously generated by LPRng.
I ran into a problem with this on some other systems. The
problem was that the 'shutdown()' system call did NOT flush
any buffers, and clobbered the ongoing connection. The
problem here is that you need to 'close' some connections
but wait until you get all of the job status back.
If you have seen this problem, I would like you to try the following;
In the LPRng/src/common/lpd_jobs.c file, around 1359 we have:
SETSTATUS(job)"printing job '%s'", id );
/* Print_job( output_device, status_device, job, timeout, poll_for_status ) */
status = Print_job( fd, status_fd, job, Send_job_rw_timeout_DYN, poll_for_status );
/* we close close device */
DEBUG1("Local_job: shutting down fd %d", fd );
if( fstat(fd,&statb) == -1 ){
fd = -1;
} else if( shutdown( fd, 1 ) == -1 ){ <<-- possible cause of problems
close(fd);
fd = -1;
}
DEBUG1("Local_job: after shutdown fd %d", fd );
if( status_fd > 0 && fstat(status_fd,&statb) == -1 ){
status_fd = -1;
}
Please change this to:
if( fstat(fd,&statb) == -1 ){
fd = -1;
/* } else if( shutdown( fd, 1 ) == -1 ){ */
} else {
close(fd);
fd = -1;
}
If you can do this, please recompile and test your printing system for
those mysterious 'bad print job' problems you were having.
Patrick Powell
-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------