Package: capi4hylafax
Version: 1:01.02.03-7
Followup-For: Bug #293808

I think I found the problem. This is my analysis:

Starting with Hylafax version 4.2.0, it writes a line "returned:0" into 
the queue file before starting SendFaxCmd. Versions 4.1.7 and 4.1.8 did 
not do this.

c2faxsend doesn't seem to change this value.

Probably the value in the queue file takes precedence over the exit 
code of SendFaxCmd (c2faxsend).

c2faxsend exits with code 2 which corresponds to the enum value 
"send_done" and the value returned:0 corresponds to "send_retry".

Proposed fix:
c2faxsend should write a line "returned:<exit_code>" into the queue file 
before exiting.

To verify my solution I successfully used this wrapper script 
/usr/bin/c2faxsend.wrap:

#! /bin/sh
/usr/bin/c2faxsend "$@"
rc=$?
eval qfile=\$$#
sed 's/^returned:0$/returned:'${rc}'/' $qfile > ${qfile}.new
mv ${qfile}.new $qfile
exit $rc

I changed my /etc/hylafax/config to use this wrapper script instead of 
the real c2faxsend program:

#SendFaxCmd:            /usr/bin/c2faxsend
SendFaxCmd:             /usr/bin/c2faxsend.wrap

This can be used as a workaround until c2faxsend is fixed.
(dont forget to chmod a+rx /usr/bin/c2faxsend.wrap)


Bodo

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (900, 'testing'), (300, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.27-2-686-smp
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages capi4hylafax depends on:
ii  isdnactivecards       1:3.3.0.20041110-1 support for active ISDN cards and 
ii  libc6                 2.3.2.ds1-20       GNU C Library: Shared libraries an
ii  libcapi20-2           1:3.3.0.20041110-1 libraries for CAPI support
ii  libgcc1               1:3.4.3-6          GCC support library
ii  libstdc++5            1:3.3.5-8          The GNU Standard C++ Library v3
ii  libtiff4              3.7.1-3            Tag Image File Format (TIFF) libra

-- no debconf information

ii  hylafax-server 4.2.1-2        Flexible client/server fax software - server


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to