When parsing triggers, cp was actually kept to point a character ahead
of the next character. This meant that at the top of the while loop, it
was past the end of the the string it was supposed to be parsing.
With a busy faxq fifo, "past the end of the string" is pointing at the
next command faxq would normally process. Trigger::parse() was trying
to parse that command, and erroring, because it is not a trigger spec.
This makes sure that the trigger spec is parsed correctly, and will not
move on trying to parse "other" memory.
faxq was never freeing all the rotors. This would lead to situations
that if you had more than 32 (1024 bits, and 32 bits per rotor slot)
triggers active, you would eventually hit conditions where it could not
allocate another tid, because it thought they were all still in use,
even though the vast majority had been freed, but not accounted for
correctly in the bit array.
Fixed comment parsing to not segfault on invalid header or on comment with embedded comment or quoted parentheses. Not all header type can contain comments so we can't blindly strip them from every header. Only parse the MIME-Version header for comment for now.
We need to handle the errors in pipe/fork for JobControl in a way that doesn't
cause ctrlJobDone() to be called. If it's called directly, it tries to log the
qfile (which is already locked) and causes problems.
JobControlWait isn't needed with the new scheduler, and it turns out it is
broken as well - it caused faxq to wait for a lock on the qfile, which is
already locked in the patch which waits...
Aidan Van Dyk [Fri, 15 Jun 2007 14:26:45 +0000 (14:26 +0000)]
Some notes about Dex 855 setting MMR when also indicating JBIG L0.
From Lee:
| commit 6a481efe2f088f1f4137d3b5709eae3882d5c26a
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Thu Jun 14 16:58:21 2007 +0000
|
| Some notes about Dex 855 setting MMR when also indicating JBIG L0.
Aidan Van Dyk [Fri, 8 Jun 2007 18:38:55 +0000 (18:38 +0000)]
Resuffle a bit to make proper release notes easier.
The html/ directory is old and crufty, and already archived:
http://www.hylafax.org/site1/
The README is now more simple, and points to the version specific
release notes, which contains information about new features, possible
incompatibilities, and changes.
Release notes can be accumulated on a per-release basis, and should
remain in the tree for past versions too.
Aidan Van Dyk [Tue, 5 Jun 2007 17:30:16 +0000 (17:30 +0000)]
Add <play:filename> escape sequence for modem AT commands
This adds a "play" feature to modem AT command configs that allows
a modem to play a raw audio file. This feature can be used to play a
brief audio message after picking up the line but before answering.
This is based on Lee's ESC_PLAY idea:
add voice "play" feature for modem config commands
Aidan Van Dyk [Mon, 4 Jun 2007 17:11:07 +0000 (17:11 +0000)]
FaxRequest: Status codes for jobs
This patch introduces a Status object, and uses it in FaxRequest instead
of the fxStr notice to make sure we always have a code associated with any
error/status change in a job.
It introduces a new JPARM STATUSCODE command in the clinet-server protocol
so clients can retreive the "code" of the status as well as the status
string.
Aidan Van Dyk [Mon, 28 May 2007 18:34:48 +0000 (18:34 +0000)]
tiffcheck: Don't allow "fudge factor" when checking length
No fudge factor is allowed in FaxServer::sendSetupParams1(), which
means that a tiff that passes tiffcheck will cause an error when faxsend
comes across it.
Aidan Van Dyk [Mon, 28 May 2007 15:28:23 +0000 (15:28 +0000)]
faxq: Properly clear the old status before processing a job
The old status needs to be cleared before processing a job. It was being
done in 1 case, but not all. This moves it into the processJob() to make
sure it's always cleared.
Aidan Van Dyk [Tue, 15 May 2007 15:52:03 +0000 (15:52 +0000)]
faxGetty: fix some EXTERN GETTY bugs
In the work on egetty, it changed from modemAnswerCallCmd to
modemAnswerCall. Unfortunately, this broke the use of the
ModemAnswer*BeginCmd config options which used to be used, and chagne to
the ModeAnswer*Cmd ones (which the answerCall() routines use. In
addition, the answerCall() routine actively *disallows* setting any of
those to blank, making it impossible to have nothing be sent to the modem
for any of these cases. It would blindly send ATA if any of them were set
to blank.
This fixes some bugs in the extern handling, updates the getty stuff to
allow CallID passing as arguments, and reverts back to useing
modemAnswerCallCmd() instead of modemAnswerCall().
Aidan Van Dyk [Fri, 11 May 2007 15:50:13 +0000 (15:50 +0000)]
faxsetup: Add another base64 encoder
This simplifies the logic for setting BASE64ENCODE, while adding support
for "base64" found at least on FreeBSD.
Seen in:
| commit f9871f9ac111aa47d76d6e60d37ce6b09821a4c3
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Tue Mar 13 17:04:49 2007 +0000
|
| Adds support for John Walker's base64 encoder found at least on
| FreeBSD.
|
| http://www.fourmilab.ch/webtools/base64/
Aidan Van Dyk [Fri, 11 May 2007 15:50:02 +0000 (15:50 +0000)]
Tolerate bad echo as best we can
From Lee:
| commit 234849d4b65354c8d01aed20c9a9bc3dff287c85
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Mon Mar 5 18:40:58 2007 +0000
|
| Sometimes echo can be so bad on a channel that we will hear ourselves back,
| especially after signalling something like MCF or CFR that is short (in
| contrast to PPR which is long).
|
| Although this situation really represents a medium problem - something's wrong
| on the call itself - I think that we need to do what we can to address it
| where we can... tolerance as best as possible.
|
| So this is a first stab at that. This only does it in Phase C ECM, so there
| are other places where this needs to be addressed (although they would be much
| more infrequent elsewhere) if this helps.
Aidan Van Dyk [Fri, 11 May 2007 15:49:24 +0000 (15:49 +0000)]
Class: Handle DF=2
From Lee:
| commit 0f12c6104f78fe0400a08be482352971650f2304
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Sat Feb 17 01:36:07 2007 +0000
|
| Some modems erroniously indicate MR compression with DF=2. Handle it.
Aidan Van Dyk [Fri, 11 May 2007 15:48:39 +0000 (15:48 +0000)]
Class2: Add JPEG (colour fax) support
From Lee:
| commit d52f97c68ac9e30e21c5bed68589fe384a7ba7db
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Wed Feb 21 19:23:06 2007 +0000
|
| Adds JPEG (color fax) support to Class 2 driver.
|
| A JP value needed to be added to Class2Params and the JPEG DF values migrated
| to the new JPs in order to properly support T.32 as well as T.30... which makes
| it a rather intrusive work.
and:
| commit 7fd4331e446076fea55da01d735feb82f05f6489
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Tue Feb 27 21:14:44 2007 +0000
|
| Initialize params.jp in case FAXDCS is not present.
and:
| commit 920ba9f3ed2875c9639cc6ac33788a9f0b50e17b
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Tue Feb 27 21:35:17 2007 +0000
|
| this would have prevented the faxinfo issue - so we'll do this as a
| safety net
Aidan Van Dyk [Fri, 11 May 2007 15:33:40 +0000 (15:33 +0000)]
ECM: Compensate for ECM mandated data when no ECM signalled
From Lee:
| commit 2ca80919bd196f5df1fef07b8425e60bb9d346f2
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Tue Feb 7 00:25:54 2006 +0000
|
| compensate for senders that send MMR, JBIG, or JPEG data without
| signalling ECM
Aidan Van Dyk [Fri, 11 May 2007 15:33:11 +0000 (15:33 +0000)]
Class2: Preliminary JBIG support (per T.32 A)
From Lee:
| commit 332db6d3e20c5ec212a6d00ff72e39f90d513ece
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Fri Feb 16 06:04:17 2007 +0000
|
| adds preliminary JBIG support for Class 2 devices (that also support it per
T.32 A)
Aidan Van Dyk [Fri, 11 May 2007 15:32:53 +0000 (15:32 +0000)]
Class1: Slow down the hangup
From Lee:
| commit f9f4ba45a930c433df7831f6413569c16c03a20b
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Wed Feb 28 20:27:58 2007 +0000
|
| a delay before hanging up helps prevent the hangup from precluding the full
| reception of the audio by the receiver
From Lee:
| commit b4dea3f34202ac2dda1f1183683bfaf805535c2b
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Mon Mar 5 19:57:46 2007 +0000
|
| Bruno improves "modem echoes dialstring" handling.
Aidan Van Dyk [Fri, 11 May 2007 15:31:11 +0000 (15:31 +0000)]
Class1/Class2: Allow disabling V17
From Lee:
| commit ffc20fd438a03b1f7ab35156903f3bd9c14a92d7
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Tue Mar 6 20:19:30 2007 +0000
|
| Assuming we can find a command to disable V.17 (S-register), then
| We'll want to set it with Class2DisableV17Cmd.
and:
| commit 9dbd1f2b510d08a11020c6703a46b8d634799d7d
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Tue Mar 6 21:53:41 2007 +0000
|
| A little more required for disabling V.17.
Aidan Van Dyk [Fri, 11 May 2007 15:29:41 +0000 (15:29 +0000)]
Class2: Extend data timeout for long running ECM sessions
From Lee:
| commit b13bf79fd294d251a5c6d63880df23d5052e8c36
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Thu Mar 8 02:36:53 2007 +0000
|
|
| First, extend the Class 2 dataTimeout to allow for long-running ECM sessions.
Aidan Van Dyk [Fri, 11 May 2007 15:29:24 +0000 (15:29 +0000)]
CLass1: Set DIS for 64-bit ECM when configured
From Lee:
| commit 64ca5e8b3c16539079bee403f478b01cc2d94efc
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Thu Mar 8 03:17:42 2007 +0000
|
| Fix DIS so that we signal a preference for 64-bit ECM when so configured.
Aidan Van Dyk [Fri, 11 May 2007 15:29:01 +0000 (15:29 +0000)]
faxq: update unsent/job on timedout during a failed send
Ported from Lee:
| commit f5cd8bf3b7e9adbf9d3918ea85a980e861e3f5d7
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Thu Mar 8 18:57:58 2007 +0000
|
| Davide Pagnin points out that xferfaxlog isn't getting updated properly for
| UNSENT records when sending jobs time out and fail.
|
| Also, we weren't updating the status in the req file, either.
Aidan Van Dyk [Fri, 11 May 2007 15:27:40 +0000 (15:27 +0000)]
Class2: +FHS:E0 information
From Lee:
| commit 44df7916b192c586e2fc214630e688efbe8e05cb
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Mon Mar 12 23:27:20 2007 +0000
|
| +FHS:E0 information
and:
| commit 2b31020c634616135405714c6c8103cdde30515a
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Tue Mar 13 16:08:24 2007 +0000
|
| *** empty log message ***
Aidan Van Dyk [Fri, 11 May 2007 15:27:26 +0000 (15:27 +0000)]
Class1: Handle strange PPS
From Lee:
| commit 7b71b8249bc0f34a3e9b46e62d6edab06df27faa
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Wed Mar 14 21:12:12 2007 +0000
|
| Handle bizarre PPS-<??> cases as best as possible.
Aidan Van Dyk [Fri, 11 May 2007 15:27:11 +0000 (15:27 +0000)]
Switch "agere-mp" for "mainpine" in config files...
From Lee:
| commit 513b801dc10533586bc29bbe3d1d6a96b71a3005
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Mon Mar 19 23:26:06 2007 +0000
|
| Switch "agere-mp" for "mainpine"... as the firmware is indeed the
| responsibility of Mainpine.
Aidan Van Dyk [Fri, 11 May 2007 15:17:23 +0000 (15:17 +0000)]
faxaddmodem: Encourage Class 1
From Lee:
| commit 6253f0c36da8d5858acc6b3e668465f334715734
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Wed Mar 28 22:44:49 2007 +0000
|
| trying to encourage lay users to prefer Class 1
Aidan Van Dyk [Fri, 11 May 2007 15:17:11 +0000 (15:17 +0000)]
Class1: Add Class1HasRHConnectBug
From Lee:
| commit 05038f8b2612db1886cf9d1387d26bdf4177ac0d
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Thu Apr 12 23:52:18 2007 +0000
|
| Lucent/Agere modems notoriously will report CONNECT after AT+FRH=3 at the
| wrong times. Class1HasRHConnectBug is an attempt to cope with that evil
| behavior.
Aidan Van Dyk [Fri, 11 May 2007 15:16:45 +0000 (15:16 +0000)]
Class1: Work around modem's failure to double DLE
From Lee:
| commit d4fed05da7ea342d6d1d5450fa8a1292aae5975c
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Fri Mar 9 02:03:44 2007 +0000
|
| Some modems don't double up their DLEs like they should. This may
| help us with them.
Aidan Van Dyk [Fri, 11 May 2007 15:15:58 +0000 (15:15 +0000)]
Class1: Wait longer to make sure remote is not signaling after bad HDLC
From Lee:
| commit 1bf408d11df448a1087a5333ec5b55d912de9b5b
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Sun Mar 4 01:49:11 2007 +0000
|
| We really need to make sure that the remote is not signalling when we send
| CRP... or it's in vain. If we get bad HDLC for DCS then we're apt to send
| CRP while the remote is signalling TCF. So we double-up on the wait, to
| make sure that we're really okay to go.
|
| Two AT+FRS=7 in a row may be less-elegant than a single AT+FRS=14...
|
| But to do that properly we'd have to change the Class1SwitchingCmd definition
| or do some stuff that really won't be nice to do right now.
and:
| commit bb9c6341756c376b6daeba980f01ef5f1566a9a4
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Wed Mar 14 23:31:07 2007 +0000
|
| We have code deliberately preventing the duplication of switchingPause commands
| being sent to the modem. Duh. So the previous approach wouldn't work.
|
| So we've got to do this the more elegant way... :-)
and:
| commit 19d29e3dc455798ca8ef90cf39db8fb5e892abef
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Sat Apr 14 22:08:34 2007 +0000
|
| fxStr .head isn't very forgiving if the string length isn't enough. :-(
Aidan Van Dyk [Fri, 11 May 2007 15:15:45 +0000 (15:15 +0000)]
Class1: Don't send RTN after a complety empty page.
From Lee:
| commit 44a134ecbb37ab5adfafaffbf9f58af61908d9a1
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Mon Apr 16 16:51:30 2007 +0000
|
| Regardless of the BadPageHandling setting, if we get no page image data at
| all, then sending RTN at all risks confirming the non-page to RTN-confused
| senders, which risk is far worse than just simply hanging up.
Aidan Van Dyk [Fri, 11 May 2007 15:15:14 +0000 (15:15 +0000)]
Bug 857: socklen_t changes for HP UX 11
Bernd Krumböck reports that socklen_t needs some work on HP UX 11, and Lee
fixes it slightly differently from buzilla:
| commit 8dc95d771b3a19474185d639a92d0ad647dbb03e
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Wed Apr 18 05:26:49 2007 +0000
|
| Follows Bernd's suggestions on hylafax.org Bug 857
Aidan Van Dyk [Fri, 11 May 2007 15:14:40 +0000 (15:14 +0000)]
Add notes about RocketModem IV
From Lee:
| commit cf905ca6366ad2215e3e238295d95855ad7016a1
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Wed Apr 18 21:39:29 2007 +0000
|
| Adding notes about RocketModem IV.
Aidan Van Dyk [Fri, 11 May 2007 15:10:10 +0000 (15:10 +0000)]
Class1: Simplify checking of curcap->br
From Lee:
| commit baed15855baa0218ec602dfd8692f0e1235b5e86
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Fri Apr 20 18:34:15 2007 +0000
|
| Simplify the math. Prevent br == -1 from messing stuff up.
and:
| commit cd73bc92f298a1744a98664a101d7f52bf4d4bb3
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Wed Apr 25 04:26:46 2007 +0000
|
| this works better, curcap->br is u_char, after all
Aidan Van Dyk [Fri, 11 May 2007 15:09:45 +0000 (15:09 +0000)]
Class1: Remove Class1RCVFecvHack
From Lee:
| commit a2934329d37a85bdc19fc02de3a46824a971f91e
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Wed May 2 18:06:33 2007 +0000
|
| Class1TCFRecvHack is a bad approach because it's really not properly supported
| by some modems, and furthermore it relies on the idea that the V.21 carrier
| will be present when we go to look for it - and that may not be true.
|
| Simply looking for silence is better.
Aidan Van Dyk [Fri, 11 May 2007 15:08:05 +0000 (15:08 +0000)]
Class1: Add Class1MRSupport and Class1MMRSupport
From Lee:
| commit 681466fa6aa0423e99f96c3eb1c34c02fe1c6643
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Thu May 3 00:27:59 2007 +0000
|
| Adds Class1MRSupport and Class1MMRSupport features... not likely to be
| used frequently, but they're handy for testing and some other odd
| scenarios.
Aidan Van Dyk [Fri, 11 May 2007 15:06:02 +0000 (15:06 +0000)]
Class1: Tolerate carrier up after a valid TCF signal
From Lee:
| commit 979beebef863a4b77f88deca030249d31c47d102
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Fri May 4 18:31:56 2007 +0000
|
| There's really no need to discriminate against a sender who, after
| sending the TCF signal, keeps the carrier up for a while afterwards.
Aidan Van Dyk [Fri, 11 May 2007 15:05:03 +0000 (15:05 +0000)]
Class1: improve handling of CRP when in Phase B receiving
| commit 0a1cb346135e33af7541075ae13232d1c3207b66
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Wed May 9 18:48:53 2007 +0000
|
| improve handling of CRP when in Phase B receiving
Aidan Van Dyk [Fri, 11 May 2007 15:04:49 +0000 (15:04 +0000)]
Class1: Ignore DIS when listing for TSI/DCS
From Lee:
| commit 0df3d8055d49780b2214d01525d060326f337898
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Mon May 7 18:23:00 2007 +0000
|
| Getting DIS when listening for TSI/DCS is likely just our own echo.
| Ignore it.
Aidan Van Dyk [Fri, 11 May 2007 15:03:54 +0000 (15:03 +0000)]
Class1: Set V.8 bit in DIS when applicable.
From Lee:
| commit 6a8ca65e979bf39f16461e13b221ad6768e22b5b
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Thu Feb 15 23:36:39 2007 +0000
|
| Set V.8 bit in DIS when applicable.
Aidan Van Dyk [Fri, 11 May 2007 15:02:07 +0000 (15:02 +0000)]
configure: Utilize tiffcp exit value
From Lee:
| commit 6a8ca65e979bf39f16461e13b221ad6768e22b5b
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date: Thu Feb 15 23:36:39 2007 +0000
|
| Utilize tiffcp exit value instead of output in configure check for
| JBIG.
Aidan Van Dyk [Tue, 8 May 2007 20:38:42 +0000 (20:38 +0000)]
faxmail: Read faxmail.conf in the delivery part too
This way faxmail.conf can set "delivery" type options that can override
sendfax.conf options. It used to only be able to get formatting/handling
options from faxmail.conf because the "SendFaxClient" class only read
sendfax.conf (along with the other SYSCONF and USERCONF files).
Aidan Van Dyk [Tue, 8 May 2007 20:31:42 +0000 (20:31 +0000)]
faxmail: make it do what most people expect
This changes faxmail to be a mail2fax gateway program instead of an e-mail
Postscript formatter. It does a few things:
* Removes the -d for direct delivery. It *always* delivers to HylaFAX,
because it now handles mime and attachments as individual documents
instead of merging them into a postscript output.
* Attachments/mime parts are handled independently of each other and given
to HylaFAX as separate documents in the job.
* Typerules is used to manage any "document conversion", exactly in the
same manner as sendfax. The "mime converters" is not used at all. This
is even more beneficial because experience shows that many popular MUAs
use a blanket application/octect-stream, or even wrong ones when
identifying parts.
* If a mime part *can't* be converted and submitted, the message delivery
fails so the MTA can notify the sender. This is an improvement over
the old behaviour of just "discarding" the part, and the sender has no
way of knowing.