Hylafax Mailing List Archives
|
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
BSD/OS problem (more info)
The problem isn't parsing the dialrules file it is actually parsing the
phone number! I traced through it with dialtest and gdb. Here is a little
more info:
speedy: {1} % ./dialtest -v /var/spool/fax/etc/dialrules
/var/spool/fax/etc/dialrules: line 0: Define AreaCode = "415"
/var/spool/fax/etc/dialrules: line 0: Define CountryCode = "1"
/var/spool/fax/etc/dialrules: line 0: Define InternationalPrefix = "011"
/var/spool/fax/etc/dialrules: line 0: Define LongDistancePrefix = "1"
/var/spool/fax/etc/dialrules: line 16: Define Area = "415"
/var/spool/fax/etc/dialrules: line 17: Define Country = "1"
/var/spool/fax/etc/dialrules: line 18: Define IDPrefix = "011"
/var/spool/fax/etc/dialrules: line 19: Define LDPrefix = "1"
/var/spool/fax/etc/dialrules: line 21: Define WS = " "
/var/spool/fax/etc/dialrules: line 30: CanonicalNumber := [
/var/spool/fax/etc/dialrules: line 31: "#.*" = ""
/var/spool/fax/etc/dialrules: line 32: "[abcABC]" = "2"
/var/spool/fax/etc/dialrules: line 33: "[defDEF]" = "3"
/var/spool/fax/etc/dialrules: line 34: "[ghiGHI]" = "4"
/var/spool/fax/etc/dialrules: line 35: "[jklJKL]" = "5"
/var/spool/fax/etc/dialrules: line 36: "[mnoMNO]" = "6"
/var/spool/fax/etc/dialrules: line 37: "[prsPRS]" = "7"
/var/spool/fax/etc/dialrules: line 38: "[tuvTUV]" = "8"
/var/spool/fax/etc/dialrules: line 39: "[wxyWXY]" = "9"
/var/spool/fax/etc/dialrules: line 40: "[^+0-9]+" = ""
/var/spool/fax/etc/dialrules: line 41: "^011" = "+"
/var/spool/fax/etc/dialrules: line 42: "^1" = "+1"
/var/spool/fax/etc/dialrules: line 43: "^[^+]" = "+1415&"
/var/spool/fax/etc/dialrules: line 44: ]
/var/spool/fax/etc/dialrules: line 50: DialString := [
/var/spool/fax/etc/dialrules: line 51: "[- .]+" = ""
/var/spool/fax/etc/dialrules: line 52: "[abcABC]" = "2"
/var/spool/fax/etc/dialrules: line 53: "[defDEF]" = "3"
/var/spool/fax/etc/dialrules: line 54: "[ghiGHI]" = "4"
/var/spool/fax/etc/dialrules: line 55: "[jklJKL]" = "5"
/var/spool/fax/etc/dialrules: line 56: "[mnoMNO]" = "6"
/var/spool/fax/etc/dialrules: line 57: "[prsPRS]" = "7"
/var/spool/fax/etc/dialrules: line 58: "[tuvTUV]" = "8"
/var/spool/fax/etc/dialrules: line 59: "[wxyWXY]" = "9"
/var/spool/fax/etc/dialrules: line 60: "^[+]1" = "1"
/var/spool/fax/etc/dialrules: line 61: "^[+]" = "011"
/var/spool/fax/etc/dialrules: line 62: ]
ready> 757-0248
input = "757-0248"
Apply CanonicalNumber rules to "757-0248"
Assertion failed "Str::remove: Invalid range", file "Str.c++" line 231.
Abort trap (core dumped)
------------------------------------------
speedy: {1} % gdb dialtest dialtest.core
GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.15.1 (i386-unknown-bsdi2.1),
Copyright 1995 Free Software Foundation, Inc...
Core was generated by `dialtest'.
Program terminated with signal 6, Abort trap.
#0 0x17385 in kill ()
(gdb) bt
#0 0x17385 in kill ()
#1 0x168e3 in abort ()
#2 0x4f80 in _fxassert () at fxassert.c:33
#3 0x1ec2 in fxStr::remove (this=0xefbfd63c, start=3, chars=4294967292)
at Str.c++:231
#4 0x491a in DialStringRules::applyRules (this=0xefbfdb50, name=@0xefbfd670,
s=@0xefbfd6e8) at DialRules.c++:374
#5 0x4af4 in DialStringRules::canonicalNumber (this=0xefbfdb50, s=@0xefbfd6e8)
at DialRules.c++:426
#6 0x16c3 in main (argc=3, argv=0xefbfdb98) at .././util/dialtest.c++:120
(gdb) q
---------------------------------
The error comes about because in DialRules.c++ on lines 352-353:
352 int ix = rule.pat->StartOfMatch();
353 int len = rule.pat->EndOfMatch() - ix;
len ends up being less than 0. ix = 3 and len = -4.
ugh
Steve
---
Steve Roderick ProAxis Communications, Inc.
steve@proaxis.com Internet Access Provider
(541) 757-0248
>From POPmail Wed Feb 19 08:18:39 1997