HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: tsi problem



RICK_@t-online.de (Juergen Anzer) writes:

> I´ve got the same problem 2 days ago here. 
> 
> A nice guy (see quoted post below) managed this problem only by uncommenting 
> TSI-checking.
> 
> I also have the problem, that I want to receive a TSI like "", but 
> nevertheless TSI-checking would be appreciated to block some spam-faxes here 
> that have TSI.
> 
> Perhaps anyone else in this list has an idea?!

Well, I posted my thoughts on that subject about two weeks ago, but nobody
responded since then :-( It was the second time when I pointed to the
obvious bug without any responce (first one was broken egetty support under 
Linux -- still there). I also posted my recvstats/xferstats fixes two days
ago and again was totally ignored. Seems that there is no people in this
list interested in fixing bugs and futher development. "hylafax-devel"
mailing list is virtually dead -- just several messages for last three
months. :-(((

I repeat my two weeks-old message for you in hope that it would be useful:

Subject: flexfax: Problem with empty sender's TSI 
To: flexfax@sgi.com
Date: 29 Jan 2000 21:05:07 +0300

Hylafax incorrectly rejects incoming fax with empty (but present) TSI
despite of "^.*$" rule in the etc/tsi. The problem is in the following code 
(util/RegEx.c++):

[---cut--]
fxBool
RegEx::Find(const char* text, u_int length, u_int off)
{
    if (compResult == 0) {
	/*
	 * These two checks are for compatibility with the old
	 * InterViews code; yech (but the DialRules logic needs it).
	 */
	if (off >= length || (off != 0 && _pattern[0] == '^'))
	    execResult = REG_NOMATCH;
	else {
	    matches[0].rm_so = off;
	    matches[0].rm_eo = length;
	    execResult = regexec(&c_pattern, text, c_pattern.re_nsub+1,
			    matches, REG_STARTEND);
	}
    }
    return (execResult == 0);
}
[---cut---]

Needless to say that Find() reports no match in case of empty string
because of the first if() condition ( length and ofs == 0 ). I would change
this to something like

((off || length) && off >= length) || (off && _pattern[0] == '^')

if not the reference to "InterViews code" in the comment. Does anybody know 
that is this? BTW, DialRules logic should not be broken if the above
changes are applied.

Hope to hear from you soon,
Dmitry





Project hosted by iFAX Solutions