backends/archive.c handles crossposts in flatfiles incorrectly

Karl Skibinski charly at 40.to
Sun Jan 20 23:03:00 UTC 2002


Hi!

Due to a missing test for a concatenation condition backends/archive.c
handles crossposts of archived articles incorrectly when trying to
concatenate the articles into one file per group.

The code for writing crossposts makes no distinction between one
article per file (tradspool style) and concatenating archives. Thus
trying first to create some hard- and then softlink between the
destination files and at last, if both fails (because the destination
file already exists), writes the first archive over the second.


I appended a patch that corrects this behavior.


Greetings, Charly!



-- Attached file included as plaintext by Ecartis --

Index: backends/archive.c
===================================================================
RCS file: /home/cvs/repository/external/isc/inn/backends/archive.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -r1.1.1.1 -r1.2
*** backends/archive.c	2002/01/20 22:03:00	1.1.1.1
--- backends/archive.c	2002/01/20 22:30:59	1.2
***************
*** 601,607 ****
  			*p = '\0';
  		    }
  			
! 		    if (base) {
  			/* Try to link the file into the archive. */
  			if (link(base, dest) < 0) {
  
--- 601,607 ----
  			*p = '\0';
  		    }
  			
! 		    if (base && !Concat) {
  			/* Try to link the file into the archive. */
  			if (link(base, dest) < 0) {
  




More information about the inn-workers mailing list