]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Bug 268: change tiff2fax from using symbolic links as they were problematic
authorLee Howard <faxguy@howardsilvan.com>
Thu, 12 Aug 2004 05:35:12 +0000 (05:35 +0000)
committerLee Howard <faxguy@howardsilvan.com>
Thu, 12 Aug 2004 05:35:12 +0000 (05:35 +0000)
         when used in conjunction with shared documents.  Now we create
         a copy of the file instead.

CHANGES
util/tiff2fax.sh.in

diff --git a/CHANGES b/CHANGES
index 928b3b942ec1728e6cba639aaafbfa91bc27c138..9141f39f344755bb7a5e032a3df5da7723be5e1a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,7 @@
 
 Changelog for HylaFAX 4.2.0
 
+* stop tiff2fax from using problematic symbolic links (11 Aug 2004)
 * fix truncation of last byte on sent MMR data (09 Aug 2004)
 * fix end of page signals and padding (23 Jul 2004)
 * prevent internationalization from interfering with build (22 Jul 2004)
index a0295c930290db979cdf3b3026159e28166e2b5e..2a026aaf034d9e5282cb1f7201e1d744822a0035 100644 (file)
@@ -109,27 +109,20 @@ ACTIONS=`echo "$RESULT" | $SED 1q`
 case "$ACTIONS" in
 OK)                            # no conversion needed
     #
-    # Two things to be aware of here.  We avoid using hard
-    # links because it screws up faxqclean logic that assumes
-    # the only hard links are used temporarily when document
-    # files are being created during the job submission process.
-    # Second, faxq creates the target file and locks it as
-    # part of the logic used to insure only one job at a time
-    # images a document.  Because we clobber the target file
-    # in this case we potentially open a window where someone
-    # may decide to image the same document.  We could depend
-    # on $LN doing the clobber for us and not remove the file
-    # first but on some systems this won't happen even though
-    # we are not an interactive process (so there's no way to
-    # prompt for a confirmation before clobbering the target).
-    # An alternative to all this is to do something like copy
-    # $fil to $out but then we would waste disk space.  We'll
-    # leave it like this for now and see if problems arise in
-    # which case we can always substitute a program that does
-    # the right thing.
+    # 1) We don't use hard links because it screws up faxqclean
+    #    logic that assumes the only hard links are used 
+    #    temporarily when document files are being created during
+    #    the job submission process.
+    # 2) We don't use symbolic links because the links get broken
+    #    when the source document is shared between jobs and
+    #    faxq removes the source document before all jobs complete.
     #
-    f=`echo $fil | $SED 's;.*/;;'`
-    $RM -f $out; $LN -s $f $out
+    # If we ever encounter problems where the client submits corrupt
+    # TIFF and we need to clean it up before transmission, then we
+    # can simply merge OK with REFORMAT.  For now we use $CP instead
+    # of $TIFFCP, however, to provide the client some control.
+    #
+    $CP -f $fil $out
     exit 0                     # successful conversion
     ;;
 *REJECT*)                      # document rejected out of hand