Bug #1860

nethserver-hylafax: received fax not archived

Added by Filippo Carletti over 8 years ago. Updated about 8 years ago.

Status:CLOSEDStart date:
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-hylafax
Target version:v6.4-beta1
Security class: Resolution:
Affected version:v6.4-alpha2 NEEDINFO:

Description

Expected behavior: received faxes should be archived in /var/lib/nethserver/fax/docs/received.
Archiving is done by cp in /var/spool/hylafax/etc/accounting/00savefiles.
cp fails as FILENAME is not correct.

The following patch fixes the problem:

--- /tmp/00savefiles    2013-04-05 10:39:17.000000000 +0200
+++ /var/spool/hylafax/etc/accounting/00savefiles    2013-04-10 16:57:36.018330582 +0200
@@ -6,6 +6,8 @@
 time="$2"; shift
 ENTRYTYPE="$1"; shift
 jobid="$1"; shift
+shift
+FILENAME=$1

 DOCHOME=/var/lib/nethserver/fax/docs

@@ -17,12 +19,10 @@
 "SEND")
 ;;
 "RECV")
-    FILENAME=`echo $jobid | cut -d'/' -f2`
-    FILENAME=`echo $FILENAME | cut -d'.' -f1`
-    FILE=/var/spool/hylafax/recvq/$FILENAME.tif
+    FILE=$(basename $FILENAME)

-    if [ -f $FILE ]; then
-        cp $FILE $DOCHOME/received/; chmod 666 $DOCHOME/received/$FILENAME.tif
+    if [ -f $FILENAME ]; then
+        cp $FILENAME $DOCHOME/received/ && chmod 666 $DOCHOME/received/$FILE
     fi
 ;;

Associated revisions

Revision eab15569
Added by Filippo Carletti over 8 years ago

FaxAccounting: archive using cp the right received fax file. Refs #1860

History

#1 Updated by Filippo Carletti over 8 years ago

  • Description updated (diff)
  • Target version set to v6.4-beta1
  • Affected version set to v6.4-alpha2

#3 Updated by Filippo Carletti over 8 years ago

  • Status changed from NEW to MODIFIED

#4 Updated by Davide Principi about 8 years ago

  • Status changed from MODIFIED to CLOSED
  • % Done changed from 0 to 100

Also available in: Atom PDF