![]() |
Dmitry Bely wrote: > > 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. I have no chance to have a look into the source right now, but I think the problem is more difficult. If you apply the above changes, wouldn�t you open the door to all (null)-TSI spam faxes although TSI checking is enabled? Furthermore you have apply the possibility to block a (null)TSI in the etc/tsi file. So we have to completely redesign the TSI blocking? Right now, I want to see it this way: 1.) if tsi checking is enabled, the design of HylaFAX *wants* a TSI and therefore blockes (null)TSI. This seems to be ok. 2.) if tsi checking is disabled, a (null)TSI is accepted. Tis seems to be ok, too. but 3.) I agree, that "^.*$" rule in etc/tsi is a little bit misleading. AND 4.) many thanks to all that *always* give great help in this list!!! best regards Juergen Anzer