On Tue, Nov 14, 2000 at 03:27:28PM +0100, I wrote:
> I have some problems with printing multiple copies on a generic queue.
> The LPRng version is 3.6.26, the OS Solaris 8. The queues are defined as:
The problem is that the cf file has multiple entries for the same df file
and lpd thinks that the file from every df entry must be linked to the
subqueue directory by itself. Obviously this does not work for this
scenario. So one has to check if a file has already been linked from
the generic queue directory to the subqueue directory.
I changed src/common/lpd_jobs.c as shown in the attached diff.
As I don't speak C fluently, this seems to work but is not necessarily
nice code.
Reinhard
--
Reinhard Zierke Universit�t Hamburg, FB Informatik
[EMAIL PROTECTED] Vogt-K�lln-Stra�e 30, D-22527 Hamburg
[EMAIL PROTECTED] Tel.: (040) 42883-2295/2276 Fax: -2241
*** lpd_jobs.c.ORIG Fri Oct 13 17:08:27 2000
--- lpd_jobs.c Thu Nov 16 16:57:44 2000
***************
*** 1033,1047 ****
setstatus(&job, "transferring '%s' to subserver '%s'", id,
name );
fail = 0;
for( i = 0; i < job.datafiles.count; ++i ){
datafile = (void *)job.datafiles.list[i];
if(DEBUGL3)Dump_line_list("Do_queue_jobs - copying
datafiles",
datafile);
from = Find_str_value(datafile,TRANSFERNAME,Value_sep);
! path = Make_pathname(sd,from);
! DEBUG3("Do_queue_jobs: sd '%s', from '%s', path '%s'",
! sd, from, path );
! fail |= Copy_or_link( from, path );
! if(path) free(path); path = 0;
}
from = Find_str_value(&job.info,TRANSFERNAME,Value_sep);
path = Make_pathname(sd,from);
--- 1033,1056 ----
setstatus(&job, "transferring '%s' to subserver '%s'", id,
name );
fail = 0;
for( i = 0; i < job.datafiles.count; ++i ){
+ int found = 0;
datafile = (void *)job.datafiles.list[i];
if(DEBUGL3)Dump_line_list("Do_queue_jobs - copying
datafiles",
datafile);
from = Find_str_value(datafile,TRANSFERNAME,Value_sep);
! for( j = 0; j < i; ++j ){
! if (safestrcmp(from,Find_str_value((void
*)job.datafiles.list[j],
! TRANSFERNAME,Value_sep)) == 0) {
! found = 1;
! }
! }
! if (!found) {
! path = Make_pathname(sd,from);
! DEBUG3("Do_queue_jobs: sd '%s', from '%s',
path '%s'",
! sd, from, path );
! fail |= Copy_or_link( from, path );
! if(path) free(path); path = 0;
! }
}
from = Find_str_value(&job.info,TRANSFERNAME,Value_sep);
path = Make_pathname(sd,from);