Aidan Van Dyk [Wed, 14 Jun 2006 18:07:01 +0000 (18:07 +0000)]
James Budiono caught a bug in faxmail's handling of nested multipart MIME.
This keeps a local check if we're at the end, so that the parents (up the
recursion chain) don't exit prematurely because of a nested multipart part
finishing.
Aidan Van Dyk [Mon, 12 Jun 2006 18:28:53 +0000 (18:28 +0000)]
Adds a JobProtection config option to hfaxd. This option allows for the
send/done queues to be kept "private", by giving any combination of onwer/admin/others
access to it or not.
This patch exposes a bit of the internal hfaxd "protection" mechanism by
exposing the octal value for admins to set. It would probably be better to hid
the value and just have some set of values for JobProtection that setConfigItem()
should match and then setting the octal value internally.
Aidan Van Dyk [Wed, 31 May 2006 12:49:13 +0000 (12:49 +0000)]
Add support for continuations in FaxClient
Previously, continuations were handled, but not collected. They are
now collected and made available in the getLastContinuation(), similar to
getLastReponse().
Aidan Van Dyk [Mon, 29 May 2006 18:00:28 +0000 (18:00 +0000)]
This config options allows a user to allow/disallow the use of the job's
tagline in sending. This gives the admin the ability to control the
tagline deterministically on the server.
It defaults to true, meaning that by default, job taglines can be used,
just as the historically have been.
Aidan Van Dyk [Fri, 5 May 2006 20:32:45 +0000 (20:32 +0000)]
Bug 771: DCS tag not set correctly in received image in Class2 mode
From Lee <faxguy@howardsilvan.com>:
Updates FaxParams from Class2Params when DCS is received in Class 2
This patch should fix things for you. It causes the FaxParams bits to be set,
now, when the DCS information is received from the modem when in Class 2. This
was not being done before as it should have been.
The patch also includes a check to prevent faxinfo and hfaxd from using the
FAXDCS tag information if the FAXDCS tag is "00 00 00"... so faxinfo and such
should work properly against your previously-received files.
Bug 752: Batching should not allow other users to kill my job
From Lee:
The idea is to change, from faxsend's/pagesend's perspective, the abort signal
from meaning "Job abort" to "Call abort" and marking the job as "send_retry"
instead of "send_failed"... thus taking the ability to kill a job based on an
abort signal from faxsend/pagesend (and leaving it with faxq, where it
belongs).
Users can still interrupt other users jobs, but at least now it's not fatal unless
they have reached their maxtries/maxdials.
From Giulio Orsero:
This patch affects it_IT.
I discussed it here http://lists.linux.it/pipermail/tp/2006-April/012613.html
with input/review from Giuseppe Sacco.
This patch fixes a race in the batching/scheduling code of faxq.
The race has always been present, but now that JobControl greatly extends the
time spend operating on the sleepq, the race is highly visible, not requiring
an exact signal during the sleepq processing.
sleepq get's job's added and removed from it asynchronously. It was never mant
to be "run" through in order. It was originally only added to or removed from
in the timerExpire() routines in a manner that could not be interrupted.
But with the addition of batching scanning the sleepq for jobs to batch, it now
processes the sleepq in a manner that can be interupted. JobControl
exasperates this window.
If a "sleeping" job has something happen to it (like it's TTS timer expires),
it will asynchronously go to ready (or some other state), and be put on some
other list. Once it's on the other list, it's next field can never point to
the sleepiter.head starting position, causing an infinite loop
(sleepiter.notDone() will never be true.
This patch fixes a race in the batching/scheduling code of faxq.
This race has always existed, but now that JobControl can make a run through
the runScheduler() take a long time, the race is highly visible.
runScheduler() is controled by faxQueueApp's schedTimeout. Whenever a time
expires, runScheduler() is called. The SchedTimeout::start contains logic to
try and "throttle" the runScheduler() calls, and not have it run concurrently,
but if runScheduler() ever takes more than 1 second, it can.
This patch puts a guard in faxQueueApp so it won't schedule concurrently (which
causes lots of badness in runq,sleepq, etc), and makes the
SchedTimeout::timeoutExpired() aware of this predicament so it keeps delaying
the runScheduler() if it's currently running.
The Waiting for jobcontrol wasn't quite robust enough
There are times when we have to wait, but there are times when we really don't
want to wait. The previous move of the wait into the schedule was an attempt
to remove the wait from some parts, but went too far. This patch makes the
waiting more robust...
We only need to "wait" for jobcontrol if we are activly trying to gather
batches. Waiting at other times is problematic, for instance if were
are waiting after a job starts from a pending state (job submitted for a
future time), on a busy server, sometimes runScheduler() can actuall run
between the time we put the job on the runq in ctrlJobDone(), and the
FaxRequest req is destroyed when unwonding the call stack back to
runJob() (called by the job ttsHandler.timerExpired()).
This makes our handling of the pid more intentional. We need to get
our pid into the childQueue as soon as possible. If it is not in there
when when it fires, then it's signal will be lost forever.
unblockDestJobs really shouldn't be called from unblockDestInfo in that the
two really aren't completely related. Instead, call unblockDestJobs at more
appropriate times, making sure that the timing of di.hangup precedes it when
appropriate.
Darren Nickerson [Sun, 23 Apr 2006 20:17:51 +0000 (20:17 +0000)]
[Bug 731] hfaxd FTP interface does not list JBIG encoded facsimiles
As reported by Torsten Neuer, hfaxd was not returning JBIG-encoded faxes
in the recvq/ listing. This patch by Lee Howard fixes that. Thanks Torsten
and Lee!
Darren Nickerson [Sun, 23 Apr 2006 19:56:15 +0000 (19:56 +0000)]
[Bug 769] Solaris patch for 4.3.0-rc
This patch from Aidan Van Dyk and iFAX Solutions resolves a SIGBUG
seen on Solaris 9 when HylaFAX is compiled with Sun's Workshop Pro CC:
aidan@mocha:~/hylafax/HylaFAX> /opt/SUNWspro/bin/CC -V CC: Sun C++ 5.5 2003/03/12
Darren Nickerson [Sat, 22 Apr 2006 03:25:42 +0000 (03:25 +0000)]
[Bug 760] faxrcvd corrupts communication logs
In some cases, quoted-printable encoding of emails sent by faxrcvd was
broken. This patch by Patrice Fournier and iFAX Solutions addresses that.
Thanks also to Lee Howard for valuable input into this issue!
Darren Nickerson [Sat, 22 Apr 2006 02:56:14 +0000 (02:56 +0000)]
[Bug 763] Class 2.x received g4 files are corrupted by HylaFAX
2D-MMR faxes received in Class 2.x on some Multitech modems are out of spec,
causing problems with some decoders (such as the one in libtiff). Thanks to
Patrice Fournier and iFAX Solutions.
Add JobControlWait option to faxq that makes faxq wait synchronously for
JobControlCmd to finish before continuing on. This solves peoples concern
that using JobControl reduces faxq's batching efficiency.
[Bug 753] Patton 2977 optimisations
This patch, by Lee Howard, adds Class1RMPersistence: 0 to the digi config file,
and doubles the V.21 HDLC frame reception timeout to 10 seconds. Thanks to Lee
for the patch, and to Christian for confirming that it helps. See:
[Bug 751] Ignore MESSAGE-WAITING after dialing from Hayes Accura 56K
This patch by Lee Howard allows HylaFAX to ignore the harmless
MESSAGE-WAITING response when dialing with some Conexant chipset modems.
See http://www.hylafax.org/archive/2006-02/msg00054.php for the original
problem report.
[Bug 740] In V.34 fax a lower limit of 2400 bps for primary rate renegotiations will pose problems with symbolrates other than 2400
This patch limits primary rate renegotiations to 4800. Thanks to John
Sucaet for the report, and Lee Howard for the patch!
[Bug 736] Control channel retrain (V.34 fax) results in disconnect (DCN)
Correct a logic problem in control channel retrains that caused HylaFAX
to consider them unsuccessful even when they succeeded. Thanks to John
Sucaet for the original report and fix, and Lee for the final patch.
Aidan Van Dyk [Mon, 27 Mar 2006 23:00:49 +0000 (23:00 +0000)]
Add JobControl mechanism to obsolete DestControls.
JobControlCmd (faxq config option) is a program which is run, given a jobid,
that outputs a set of "tag: value" lines (similar to config files) which
control the per-job values of things which used to be handled by DestControls.
Aidan Van Dyk [Fri, 24 Mar 2006 16:06:11 +0000 (16:06 +0000)]
Bug 723 - On some OS/distributions, hfaxd timezone handling is incorrect
On newer GLIBC, they *always* check /etc/localtime for timzone information
if TZ isn't set. Older distros cache the localtime information. If TZ isn't
set, we'll set it here before entering out chroot (where /etc/localtime
isn't available).
Aidan Van Dyk [Wed, 11 Jan 2006 22:05:56 +0000 (22:05 +0000)]
echo -e is not portable. We don't need it, it was used for a few newlines,
which can be done with 2 echos, and for getting the \n chagnes out of
$faxstatus, which now uses sed.