> From [EMAIL PROTECTED] Wed Aug 30 04:41:01 2000
> Date: Wed, 30 Aug 2000 12:19:55 +0200
> From: Christoph Beyer <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: LPRng: bug in 3.6.24 ?
>
> hi,
> I've updated some of my machines to LPRng 3.6.24 I get different lpq
> behaviour on those machines, they don't seem to forward the request to
> the spooler, I only see the local queue:
>
> now:
>
> [pcx1839] ~lp/etc $ lpq -Ptestp5
> Printer: testp5@pcx1839 (dest testp5@spoolc)
> Queue: no printable jobs in queue
> Status: job 'root@pcx1839+989' removed at 11:50:13.881
>
> before:
>
> [puls03] ~ $ lpq -Ptestp5
> Printer: testp5@puls03 (dest testp5@spoolc)
> Queue: no printable jobs in queue
> Printer: testp5@spoolc 'HP_4000N1'
> Queue: no printable jobs in queue
> Status: job 'root@pcx1839+15' removed at 11:53:45
> Filter_status: (of) done at 11:53:45.085
>
> regards Christoph
>
> P.S.: I will be away for 2 weeks ...
Well... then I guess you will probably see this patch in the next
release:
*** common/lpd_status.c 2000/08/19 20:36:06 5.17
--- common/lpd_status.c 2000/08/31 01:57:33
***************
*** 8,14 ****
***************************************************************************/
static char *const _id =
! "$Id: lpd_status.c,v 5.17 2000/08/19 20:36:06 papowell Exp $";
#include "lp.h"
--- 8,14 ----
***************************************************************************/
static char *const _id =
! "$Id: lpd_status.c,v 5.17 2000/08/19 20:36:06 papowell Exp papowell $";
#include "lp.h"
***************
*** 459,465 ****
Server_queue_name_DYN?"Server Printer":"Printer" );
}
len = strlen(header);
! SNPRINTF( header+len, sizeof(header)-len, "%s@%s ",
Printer_DYN, Report_server_as_DYN?Report_server_as_DYN:ShortHost_FQDN
);
if( safestrcasecmp( buffer, Printer_DYN ) ){
len = strlen(header);
--- 459,465 ----
Server_queue_name_DYN?"Server Printer":"Printer" );
}
len = strlen(header);
! SNPRINTF( header+len, sizeof(header)-len, "%s@%s",
Printer_DYN, Report_server_as_DYN?Report_server_as_DYN:ShortHost_FQDN
);
if( safestrcasecmp( buffer, Printer_DYN ) ){
len = strlen(header);
***************
*** 753,780 ****
"Get_queue_status: RemoteHost_DYN '%s', RemotePrinter_DYN '%s', Lp
'%s'",
RemoteHost_DYN, RemotePrinter_DYN, Lp_device_DYN );
- if( RemoteHost_DYN && RemotePrinter_DYN ){
- len = strlen( header );
- s = Frwarding(&Spool_control);
- if( displayformat == REQ_VERBOSE ){
- if( s ){
- SNPRINTF( header+len, sizeof(header)-len,
- "\n Forwarding: %s", s );
- } else {
- SNPRINTF( header+len, sizeof(header)-len,
- "\n Destination: %s@%s", RemotePrinter_DYN,
RemoteHost_DYN );
- }
- } else {
- if( s ){
- SNPRINTF( header+len, sizeof(header)-len,
- _("(forwarding %s)"), s );
- } else {
- SNPRINTF( header+len, sizeof(header)-len,
- _("(dest %s@%s)"), RemotePrinter_DYN, RemoteHost_DYN );
- }
- }
- }
-
if( displayformat != REQ_DSHORT ){
s = 0;
if( (s = Comment_tag_DYN) == 0 ){
--- 753,758 ----
***************
*** 862,896 ****
if( displayformat != REQ_VERBOSE ){
safestrncat( header, ") " );
}
! }
! if( Server_queue_name_DYN ){
len = strlen( header );
if( displayformat == REQ_VERBOSE ){
SNPRINTF( header+len, sizeof(header) - len,
! _("\n Serving: %s"), Server_queue_name_DYN );
} else {
SNPRINTF( header+len, sizeof(header) - len,
! _(" (serving %s)"), Server_queue_name_DYN );
}
}
! if( (s = Clsses(&Spool_control)) ){
len = strlen( header );
if( displayformat == REQ_VERBOSE ){
SNPRINTF( header+len, sizeof(header) - len,
! _("\n Classes: %s"), s );
} else {
SNPRINTF( header+len, sizeof(header) - len,
! _(" (classes %s)"), s );
}
}
! if( (s = Frwarding(&Spool_control)) ){
len = strlen( header );
if( displayformat == REQ_VERBOSE ){
SNPRINTF( header+len, sizeof(header) - len,
! _("\n Redirected_to: %s"), s );
} else {
SNPRINTF( header+len, sizeof(header) - len,
! _(" (redirect %s)"), s );
}
}
if( (Hld_all(&Spool_control)) ){
--- 840,883 ----
if( displayformat != REQ_VERBOSE ){
safestrncat( header, ") " );
}
! } else if( (s = Frwarding(&Spool_control)) ){
len = strlen( header );
if( displayformat == REQ_VERBOSE ){
SNPRINTF( header+len, sizeof(header) - len,
! _("\n Redirected_to: %s"), s );
} else {
SNPRINTF( header+len, sizeof(header) - len,
! _(" (redirect %s)"), s );
! }
! } else if( RemoteHost_DYN && RemotePrinter_DYN ){
! len = strlen( header );
! s = Frwarding(&Spool_control);
! if( displayformat == REQ_VERBOSE ){
! SNPRINTF( header+len, sizeof(header)-len,
! "\n Destination: %s@%s", RemotePrinter_DYN,
RemoteHost_DYN );
! } else {
! SNPRINTF( header+len, sizeof(header)-len,
! _(" (dest %s@%s)"), RemotePrinter_DYN, RemoteHost_DYN );
}
}
! if( Server_queue_name_DYN ){
len = strlen( header );
if( displayformat == REQ_VERBOSE ){
SNPRINTF( header+len, sizeof(header) - len,
! _("\n Serving: %s"), Server_queue_name_DYN );
} else {
SNPRINTF( header+len, sizeof(header) - len,
! _(" (serving %s)"), Server_queue_name_DYN );
}
}
! if( (s = Clsses(&Spool_control)) ){
len = strlen( header );
if( displayformat == REQ_VERBOSE ){
SNPRINTF( header+len, sizeof(header) - len,
! _("\n Classes: %s"), s );
} else {
SNPRINTF( header+len, sizeof(header) - len,
! _(" (classes %s)"), s );
}
}
if( (Hld_all(&Spool_control)) ){
***************
*** 1165,1171 ****
if( Find_fqdn( &LookupHost_IP, RemoteHost_DYN )
&& ( !Same_host(&LookupHost_IP,&Host_IP )
|| !Same_host(&LookupHost_IP,&Localhost_IP )) ){
! DEBUGF(DLPQ1)("Get_local_or_remote_status: doing local");
if( safestrcmp(RemotePrinter_DYN, Printer_DYN) ){
Set_DYN(&Printer_DYN,RemotePrinter_DYN);
Get_queue_status( tokens, sock, displayformat,
status_lines,
--- 1152,1158 ----
if( Find_fqdn( &LookupHost_IP, RemoteHost_DYN )
&& ( !Same_host(&LookupHost_IP,&Host_IP )
|| !Same_host(&LookupHost_IP,&Localhost_IP )) ){
! DEBUGF(DLPQ1)("Get_queue_status: doing local");
if( safestrcmp(RemotePrinter_DYN, Printer_DYN) ){
Set_DYN(&Printer_DYN,RemotePrinter_DYN);
Get_queue_status( tokens, sock, displayformat,
status_lines,
***************
*** 1176,1182 ****
Write_fd_str(*sock, msg );
}
} else {
! DEBUGF(DLPQ1)("Get_local_or_remote_status: doing remote %s@%s",
RemotePrinter_DYN, RemoteHost_DYN);
fd = Send_request( 'Q', displayformat, tokens->list,
Connect_timeout_DYN,
Send_query_rw_timeout_DYN, *sock );
--- 1163,1169 ----
Write_fd_str(*sock, msg );
}
} else {
! DEBUGF(DLPQ1)("Get_queue_status: doing remote %s@%s",
RemotePrinter_DYN, RemoteHost_DYN);
fd = Send_request( 'Q', displayformat, tokens->list,
Connect_timeout_DYN,
Send_query_rw_timeout_DYN, *sock );
***************
*** 1273,1283 ****
char *s, *t;
Init_line_list(&l);
Get_fd_image_and_split(fd,max_size,0,&l,Line_ends,0,0,0,0,0,0);
header[0] = 0;
last_printed = start = -1;
! for( i = 0; i < l.count; ++i ){
s = l.list[i];
/* find up to the first colon */
if( (t = safestrchr(s,':')) ){
--- 1260,1272 ----
char *s, *t;
Init_line_list(&l);
+ DEBUGF(DLPQ1)("Print_different_last_status_lines: status lines %d",
+status_lines );
Get_fd_image_and_split(fd,max_size,0,&l,Line_ends,0,0,0,0,0,0);
+ DEBUGFC(DLPQ1)Dump_line_list( "Print_different_last_status_lines", &l );
header[0] = 0;
last_printed = start = -1;
! if( status_lines > 0 ) for( i = 0; i < l.count; ++i ){
s = l.list[i];
/* find up to the first colon */
if( (t = safestrchr(s,':')) ){
***************
*** 1297,1308 ****
if( Write_fd_str(*sock,"\n") < 0 ) cleanup(0);
}
last_printed = i-1;
}
}
! start = i-status_lines;
if( start <= last_printed ) start = last_printed + 1;
! for( j = start; j < i; ++j ){
! if( Write_fd_str(*sock,l.list[j]) < 0 ) cleanup(0);
if( Write_fd_str(*sock,"\n") < 0 ) cleanup(0);
}
Free_line_list(&l);
--- 1286,1302 ----
if( Write_fd_str(*sock,"\n") < 0 ) cleanup(0);
}
last_printed = i-1;
+ DEBUGF(DLPQ1)("Print_different_last_status_lines: start %d,
+last_printed %d",
+ start, last_printed );
}
}
! if( status_lines > 0 ){
! start = l.count - status_lines;
! }
if( start <= last_printed ) start = last_printed + 1;
! DEBUGF(DLPQ1)("Print_different_last_status_lines: done, start %d", start );
! for( i = start; i < l.count ; ++i ){
! if( Write_fd_str(*sock,l.list[i]) < 0 ) cleanup(0);
if( Write_fd_str(*sock,"\n") < 0 ) cleanup(0);
}
Free_line_list(&l);
-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------