Re: [PATCH] regex volume 2
Hi list, haven't tested the patch myself, but it looks good and is very useful. Actually I was thinking if Kannel could implement such a functionality. +1 for me, without any doubts :) regards, Dziugas Baltrunas On Tue, 20 Jan 2004, David Schmitz wrote: > Hi, > > attached is a patch implementing some new configuration parameters based > on POSIX regular expressions. All new parameters can be used in parallel > with the non-regex-parameters. More elaborate documentation is included > in the userdoc-part of the patch. > > Awaiting votes and comments, please. > > Regards, > David > > PS: > Modified files: > gwlib/cfg.def > gwlib/regex.[ch] > gw/wap_push_ppg_pushuser.c > gw/urltrans.[ch] > gw/smscconn.c > gw/smsbox.c > gw/bb_smscconn.c > gw/smscconn_p.h > doc/userguide/userguide.xml > > The following params are new: > Group: core > white-list-regex > black-list-regex > > Group: wap-push-user > allowed-prefix-regex > denied-prefix-regex > white-list-regex > black-list-regex > > Group: smsbox > white-list-regex > black-list-regex > > Group: smsc > allowed-smsc-id-regex > denied-smsc-id-regex > preferred-smsc-id-regex > allowed-prefix-regex > denied-prefix-regex > preferred-prefix-regex > > Group: sms-service > accepted-smsc-regex > allowed-prefix-regex > denied-prefix-regex > allowed-receiver-prefix-regex > denied-receiver-prefix-regex > white-list-regex > black-list-regex > keyword-regex > > Group: sendsms-user > allowed-prefix-regex > denied-prefix-regex > white-list-regex > black-list-regex > > -- > > Mit freundlichen Gruessen/Best regards > > David Schmitz > Softwareentwicklung > > - > Wapme Systems AG > Vogelsanger Weg 80 > 40470 Düsseldorf > > Tel.: + 49 -211-7 48 45 - 2708 > Fax: + 49 -211-80-6-06-2801 > > E-Mail: [EMAIL PROTECTED] > Internet: http://www.wapme-systems.de > >
Re: [PATCH] regex volume 2
Dziugas Baltrunas wrote: > > haven't tested the patch myself, but it looks good and is very useful. > Actually I was thinking if Kannel could implement such a functionality. how do you mean "Kannel could implement such a ...". Kannel is a project, projects live from the work of individuals. Kannel couldn't code itself. Stipe mailto:[EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf, NRW, Germany phone: +49.211.74845.0 fax: +49.211.74845.299 mailto:[EMAIL PROTECTED] http://www.wapme-systems.de/ --- -BEGIN PGP PUBLIC KEY BLOCK- Version: GnuPG v1.2.2 (Cygwin) mIsEP6mcYwEEAMDnUiUwrbb+xwTFWN6TxF2+XZu7/alwJMeCwMBRvXtPZqfjpPhS OkBpU0F4TrVuugz1HINTSaJTYq10AzDQXp5NkyWgckqW79nPAWuOX0dicbJk+cN2 nM2TI4KaxUDe6u8hghNEnH/i2lXsUu9apnP/iixzV81VC2je3uc9hZpnAAYptEVT dGlwZSBUb2xqIChUZWNobm9sb2d5IENlbnRlciAmIFJlc2VhcmNoIExhYikgPHRv bGpAd2FwbWUtc3lzdGVtcy5kZT6ItAQTAQIAHgUCP6mcYwIbAwYLCQgHAwIDFQID AxYCAQIeAQIXgAAKCRABV0w1BqPYRuSqA/wPzsQxao2YePENCtgRTrO86U6zg3sl OcS6CJFI4FZP5h/xD3GRsNH1+MPSvZlomDdpFnr547DGz/Kq9MXuQwVvlVig5yWZ K5dtKp1r5YLhxJQBhfirZbRFFnYmf19f18J8OoS28tuFVftDl1AIwJS3HLyBTv6H g2HyLAEKQIp30Q== =aYCI -END PGP PUBLIC KEY BLOCK-
Re: [PATCH] regex volume 2
eh, sorry for misplaced words. let me rephrase: I was thinking if Kannel could have such feature, but of course, features are not going to appear without the work of individuals :) regards, Dziugas Baltrunas On Tue, 20 Jan 2004, Stipe Tolj wrote: > Dziugas Baltrunas wrote: > > > > haven't tested the patch myself, but it looks good and is very useful. > > Actually I was thinking if Kannel could implement such a functionality. > > how do you mean "Kannel could implement such a ...". Kannel is a > project, projects live from the work of individuals. Kannel couldn't > code itself. > > Stipe > > mailto:[EMAIL PROTECTED] > --- > Wapme Systems AG > > Münsterstr. 248 > 40470 Düsseldorf, NRW, Germany > > phone: +49.211.74845.0 > fax: +49.211.74845.299 > > mailto:[EMAIL PROTECTED] > http://www.wapme-systems.de/ > --- > > -BEGIN PGP PUBLIC KEY BLOCK- > Version: GnuPG v1.2.2 (Cygwin) > > mIsEP6mcYwEEAMDnUiUwrbb+xwTFWN6TxF2+XZu7/alwJMeCwMBRvXtPZqfjpPhS > OkBpU0F4TrVuugz1HINTSaJTYq10AzDQXp5NkyWgckqW79nPAWuOX0dicbJk+cN2 > nM2TI4KaxUDe6u8hghNEnH/i2lXsUu9apnP/iixzV81VC2je3uc9hZpnAAYptEVT > dGlwZSBUb2xqIChUZWNobm9sb2d5IENlbnRlciAmIFJlc2VhcmNoIExhYikgPHRv > bGpAd2FwbWUtc3lzdGVtcy5kZT6ItAQTAQIAHgUCP6mcYwIbAwYLCQgHAwIDFQID > AxYCAQIeAQIXgAAKCRABV0w1BqPYRuSqA/wPzsQxao2YePENCtgRTrO86U6zg3sl > OcS6CJFI4FZP5h/xD3GRsNH1+MPSvZlomDdpFnr547DGz/Kq9MXuQwVvlVig5yWZ > K5dtKp1r5YLhxJQBhfirZbRFFnYmf19f18J8OoS28tuFVftDl1AIwJS3HLyBTv6H > g2HyLAEKQIp30Q== > =aYCI > -END PGP PUBLIC KEY BLOCK- >
Re: [PATCH] regex volume 2
Dziugas Baltrunas wrote: > > eh, sorry for misplaced words. > > let me rephrase: I was thinking if Kannel could have such feature, but of > course, features are not going to appear without the work of individuals :) sounds different now ;) just kidding... I know what you ment. Stipe mailto:[EMAIL PROTECTED] --- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf, NRW, Germany phone: +49.211.74845.0 fax: +49.211.74845.299 mailto:[EMAIL PROTECTED] http://www.wapme-systems.de/ --- -BEGIN PGP PUBLIC KEY BLOCK- Version: GnuPG v1.2.2 (Cygwin) mIsEP6mcYwEEAMDnUiUwrbb+xwTFWN6TxF2+XZu7/alwJMeCwMBRvXtPZqfjpPhS OkBpU0F4TrVuugz1HINTSaJTYq10AzDQXp5NkyWgckqW79nPAWuOX0dicbJk+cN2 nM2TI4KaxUDe6u8hghNEnH/i2lXsUu9apnP/iixzV81VC2je3uc9hZpnAAYptEVT dGlwZSBUb2xqIChUZWNobm9sb2d5IENlbnRlciAmIFJlc2VhcmNoIExhYikgPHRv bGpAd2FwbWUtc3lzdGVtcy5kZT6ItAQTAQIAHgUCP6mcYwIbAwYLCQgHAwIDFQID AxYCAQIeAQIXgAAKCRABV0w1BqPYRuSqA/wPzsQxao2YePENCtgRTrO86U6zg3sl OcS6CJFI4FZP5h/xD3GRsNH1+MPSvZlomDdpFnr547DGz/Kq9MXuQwVvlVig5yWZ K5dtKp1r5YLhxJQBhfirZbRFFnYmf19f18J8OoS28tuFVftDl1AIwJS3HLyBTv6H g2HyLAEKQIp30Q== =aYCI -END PGP PUBLIC KEY BLOCK-
Re: [PATCH] regex volume 2
Hi David, patch looks good, except errors below when no regexp.h exists: In file included from gw/bb_smscconn.c:89: gw/smscconn_p.h:172: error: syntax error before "regex_t" gw/smscconn_p.h:172: warning: no semicolon at end of struct or union gw/smscconn_p.h:174: error: syntax error before '*' token gw/smscconn_p.h:174: warning: type defaults to `int' in declaration of `denied_smsc_id_regex' gw/smscconn_p.h:174: warning: data definition has no type or storage class gw/smscconn_p.h:176: error: syntax error before '*' token gw/smscconn_p.h:176: warning: type defaults to `int' in declaration of `preferred_smsc_id_regex' gw/smscconn_p.h:176: warning: data definition has no type or storage class gw/smscconn_p.h:179: error: syntax error before '*' token gw/smscconn_p.h:179: warning: type defaults to `int' in declaration of `allowed_prefix_regex' gw/smscconn_p.h:179: warning: data definition has no type or storage class gw/smscconn_p.h:181: error: syntax error before '*' token gw/smscconn_p.h:181: warning: type defaults to `int' in declaration of `denied_prefix_regex' gw/smscconn_p.h:181: warning: data definition has no type or storage class gw/smscconn_p.h:183: error: syntax error before '*' token gw/smscconn_p.h:183: warning: type defaults to `int' in declaration of `preferred_prefix_regex' gw/smscconn_p.h:183: warning: data definition has no type or storage class gw/smscconn_p.h:215: error: `shutdown' redeclared as different kind of symbol On Tuesday 20 January 2004 16:07, David Schmitz wrote: > Hi, > > attached is a patch implementing some new configuration parameters based > on POSIX regular expressions. All new parameters can be used in parallel > with the non-regex-parameters. More elaborate documentation is included > in the userdoc-part of the patch. > > Awaiting votes and comments, please. > > Regards, > David > > PS: > Modified files: > gwlib/cfg.def > gwlib/regex.[ch] > gw/wap_push_ppg_pushuser.c > gw/urltrans.[ch] > gw/smscconn.c > gw/smsbox.c > gw/bb_smscconn.c > gw/smscconn_p.h > doc/userguide/userguide.xml > > The following params are new: > Group: core > white-list-regex > black-list-regex > > Group: wap-push-user > allowed-prefix-regex > denied-prefix-regex > white-list-regex > black-list-regex > > Group: smsbox > white-list-regex > black-list-regex > > Group: smsc > allowed-smsc-id-regex > denied-smsc-id-regex > preferred-smsc-id-regex > allowed-prefix-regex > denied-prefix-regex > preferred-prefix-regex > > Group: sms-service > accepted-smsc-regex > allowed-prefix-regex > denied-prefix-regex > allowed-receiver-prefix-regex > denied-receiver-prefix-regex > white-list-regex > black-list-regex > keyword-regex > > Group: sendsms-user > allowed-prefix-regex > denied-prefix-regex > white-list-regex > black-list-regex -- Best regards / Mit besten Grüßen aus Düsseldorf Dipl.-Ing. Alexander Malysh ___ Centrium GmbH Vogelsanger Weg 80 40470 Düsseldorf Fon: +49 (0211) 74 84 51 80 Fax: +49 (0211) 277 49 109 email: [EMAIL PROTECTED] web: www.centrium.de msn: [EMAIL PROTECTED] icq: 98063111 ___ Please avoid sending me Word, Excel or PowerPoint attachments. See http://www.fsf.org/philosophy/no-word-attachments.html
Re: [PATCH] regex volume 2
Hi Alex, well, this means we (e.g. I) should wrap the regex stuff in ifdefs. :( Expect v3 this afternoon or monday) Regards, David Alexander Malysh wrote: Hi David, patch looks good, except errors below when no regexp.h exists: In file included from gw/bb_smscconn.c:89: gw/smscconn_p.h:172: error: syntax error before "regex_t" gw/smscconn_p.h:172: warning: no semicolon at end of struct or union gw/smscconn_p.h:174: error: syntax error before '*' token gw/smscconn_p.h:174: warning: type defaults to `int' in declaration of `denied_smsc_id_regex' gw/smscconn_p.h:174: warning: data definition has no type or storage class gw/smscconn_p.h:176: error: syntax error before '*' token gw/smscconn_p.h:176: warning: type defaults to `int' in declaration of `preferred_smsc_id_regex' gw/smscconn_p.h:176: warning: data definition has no type or storage class gw/smscconn_p.h:179: error: syntax error before '*' token gw/smscconn_p.h:179: warning: type defaults to `int' in declaration of `allowed_prefix_regex' gw/smscconn_p.h:179: warning: data definition has no type or storage class gw/smscconn_p.h:181: error: syntax error before '*' token gw/smscconn_p.h:181: warning: type defaults to `int' in declaration of `denied_prefix_regex' gw/smscconn_p.h:181: warning: data definition has no type or storage class gw/smscconn_p.h:183: error: syntax error before '*' token gw/smscconn_p.h:183: warning: type defaults to `int' in declaration of `preferred_prefix_regex' gw/smscconn_p.h:183: warning: data definition has no type or storage class gw/smscconn_p.h:215: error: `shutdown' redeclared as different kind of symbol On Tuesday 20 January 2004 16:07, David Schmitz wrote: Hi, attached is a patch implementing some new configuration parameters based on POSIX regular expressions. All new parameters can be used in parallel with the non-regex-parameters. More elaborate documentation is included in the userdoc-part of the patch. Awaiting votes and comments, please. Regards, David PS: Modified files: gwlib/cfg.def gwlib/regex.[ch] gw/wap_push_ppg_pushuser.c gw/urltrans.[ch] gw/smscconn.c gw/smsbox.c gw/bb_smscconn.c gw/smscconn_p.h doc/userguide/userguide.xml The following params are new: Group: core white-list-regex black-list-regex Group: wap-push-user allowed-prefix-regex denied-prefix-regex white-list-regex black-list-regex Group: smsbox white-list-regex black-list-regex Group: smsc allowed-smsc-id-regex denied-smsc-id-regex preferred-smsc-id-regex allowed-prefix-regex denied-prefix-regex preferred-prefix-regex Group: sms-service accepted-smsc-regex allowed-prefix-regex denied-prefix-regex allowed-receiver-prefix-regex denied-receiver-prefix-regex white-list-regex black-list-regex keyword-regex Group: sendsms-user allowed-prefix-regex denied-prefix-regex white-list-regex black-list-regex -- Mit freundlichen Gruessen/Best regards David Schmitz Softwareentwicklung - Wapme Systems AG Vogelsanger Weg 80 40470 Düsseldorf Tel.: + 49 -211-7 48 45 - 2708 Fax: + 49 -211-80-6-06-2801 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de
Re: [PATCH] regex volume 2
On Friday 23 January 2004 15:16, David Schmitz wrote: > Hi Alex, > > well, this means we (e.g. I) should wrap the regex stuff in ifdefs. :( > Expect v3 this afternoon or monday) not necessary and ifdefs are ugly ;) What's about defining gw_regex_t and replace regex_t and make dummy regex functions that allways returns error if regex was not compiled-in? > > Regards, > David > > Alexander Malysh wrote: > >Hi David, > > > >patch looks good, except errors below when no regexp.h exists: > >In file included from gw/bb_smscconn.c:89: > >gw/smscconn_p.h:172: error: syntax error before "regex_t" > >gw/smscconn_p.h:172: warning: no semicolon at end of struct or union > >gw/smscconn_p.h:174: error: syntax error before '*' token > >gw/smscconn_p.h:174: warning: type defaults to `int' in declaration of > >`denied_smsc_id_regex' > >gw/smscconn_p.h:174: warning: data definition has no type or storage class > >gw/smscconn_p.h:176: error: syntax error before '*' token > >gw/smscconn_p.h:176: warning: type defaults to `int' in declaration of > >`preferred_smsc_id_regex' > >gw/smscconn_p.h:176: warning: data definition has no type or storage class > >gw/smscconn_p.h:179: error: syntax error before '*' token > >gw/smscconn_p.h:179: warning: type defaults to `int' in declaration of > >`allowed_prefix_regex' > >gw/smscconn_p.h:179: warning: data definition has no type or storage class > >gw/smscconn_p.h:181: error: syntax error before '*' token > >gw/smscconn_p.h:181: warning: type defaults to `int' in declaration of > >`denied_prefix_regex' > >gw/smscconn_p.h:181: warning: data definition has no type or storage class > >gw/smscconn_p.h:183: error: syntax error before '*' token > >gw/smscconn_p.h:183: warning: type defaults to `int' in declaration of > >`preferred_prefix_regex' > >gw/smscconn_p.h:183: warning: data definition has no type or storage class > >gw/smscconn_p.h:215: error: `shutdown' redeclared as different kind of > > symbol > > > >On Tuesday 20 January 2004 16:07, David Schmitz wrote: > >>Hi, > >> > >>attached is a patch implementing some new configuration parameters based > >>on POSIX regular expressions. All new parameters can be used in parallel > >>with the non-regex-parameters. More elaborate documentation is included > >>in the userdoc-part of the patch. > >> > >>Awaiting votes and comments, please. > >> > >>Regards, > >>David > >> > >>PS: > >>Modified files: > >>gwlib/cfg.def > >>gwlib/regex.[ch] > >>gw/wap_push_ppg_pushuser.c > >>gw/urltrans.[ch] > >>gw/smscconn.c > >>gw/smsbox.c > >>gw/bb_smscconn.c > >>gw/smscconn_p.h > >>doc/userguide/userguide.xml > >> > >>The following params are new: > >>Group: core > >>white-list-regex > >>black-list-regex > >> > >>Group: wap-push-user > >>allowed-prefix-regex > >>denied-prefix-regex > >>white-list-regex > >>black-list-regex > >> > >>Group: smsbox > >>white-list-regex > >>black-list-regex > >> > >>Group: smsc > >>allowed-smsc-id-regex > >>denied-smsc-id-regex > >>preferred-smsc-id-regex > >>allowed-prefix-regex > >>denied-prefix-regex > >>preferred-prefix-regex > >> > >>Group: sms-service > >>accepted-smsc-regex > >>allowed-prefix-regex > >>denied-prefix-regex > >>allowed-receiver-prefix-regex > >>denied-receiver-prefix-regex > >>white-list-regex > >>black-list-regex > >>keyword-regex > >> > >>Group: sendsms-user > >>allowed-prefix-regex > >>denied-prefix-regex > >>white-list-regex > >>black-list-regex -- Best regards / Mit besten Grüßen aus Düsseldorf Dipl.-Ing. Alexander Malysh ___ Centrium GmbH Vogelsanger Weg 80 40470 Düsseldorf Fon: +49 (0211) 74 84 51 80 Fax: +49 (0211) 277 49 109 email: [EMAIL PROTECTED] web: www.centrium.de msn: [EMAIL PROTECTED] icq: 98063111 ___ Please avoid sending me Word, Excel or PowerPoint attachments. See http://www.fsf.org/philosophy/no-word-attachments.html
Re: [PATCH] regex volume 2
Alexander Malysh wrote: On Friday 23 January 2004 15:16, David Schmitz wrote: Hi Alex, well, this means we (e.g. I) should wrap the regex stuff in ifdefs. :( Expect v3 this afternoon or monday) not necessary and ifdefs are ugly ;) Keep quoting me :) What's about defining gw_regex_t and replace regex_t and make dummy regex functions that allways returns error if regex was not compiled-in? +1, sounds reasonable. In that case: monday it is. [snip] -- Mit freundlichen Gruessen/Best regards David Schmitz Softwareentwicklung - Wapme Systems AG Vogelsanger Weg 80 40470 Düsseldorf Tel.: + 49 -211-7 48 45 - 2708 Fax: + 49 -211-80-6-06-2801 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de
Re: [PATCH] regex volume 2
patch commited to cvs. Known issue: kannel doesn't build on systems with missing 'regexp.h'. (imo) all modern systems has 'regexp.h' support. David is working on this issue... Thanks a lot to David! On Tuesday 20 January 2004 16:07, David Schmitz wrote: > Hi, > > attached is a patch implementing some new configuration parameters based > on POSIX regular expressions. All new parameters can be used in parallel > with the non-regex-parameters. More elaborate documentation is included > in the userdoc-part of the patch. > > Awaiting votes and comments, please. > > Regards, > David > > PS: > Modified files: > gwlib/cfg.def > gwlib/regex.[ch] > gw/wap_push_ppg_pushuser.c > gw/urltrans.[ch] > gw/smscconn.c > gw/smsbox.c > gw/bb_smscconn.c > gw/smscconn_p.h > doc/userguide/userguide.xml > > The following params are new: > Group: core > white-list-regex > black-list-regex > > Group: wap-push-user > allowed-prefix-regex > denied-prefix-regex > white-list-regex > black-list-regex > > Group: smsbox > white-list-regex > black-list-regex > > Group: smsc > allowed-smsc-id-regex > denied-smsc-id-regex > preferred-smsc-id-regex > allowed-prefix-regex > denied-prefix-regex > preferred-prefix-regex > > Group: sms-service > accepted-smsc-regex > allowed-prefix-regex > denied-prefix-regex > allowed-receiver-prefix-regex > denied-receiver-prefix-regex > white-list-regex > black-list-regex > keyword-regex > > Group: sendsms-user > allowed-prefix-regex > denied-prefix-regex > white-list-regex > black-list-regex -- Best regards / Mit besten Grüßen aus Düsseldorf Dipl.-Ing. Alexander Malysh ___ Centrium GmbH Vogelsanger Weg 80 40470 Düsseldorf Fon: +49 (0211) 74 84 51 80 Fax: +49 (0211) 277 49 109 email: [EMAIL PROTECTED] web: www.centrium.de msn: [EMAIL PROTECTED] icq: 98063111 ___ Please avoid sending me Word, Excel or PowerPoint attachments. See http://www.fsf.org/philosophy/no-word-attachments.html
Re: [PATCH] regex volume 2
Hi list, attached are the missing regex-features (e.g. the issues Alex mentioned). What is new: * replaced regex_t with new gw_regex_t * all regex.h functions are mapped to a panic on systems w/o regex libraries * at compile-time a warning is issued if the libraries are missing. (gwlib/regex.c:358:2: warning: #warning "Using regular expressions although regex-libraries are missing! May result in a PANIC at runtime!") This means: if the regex-libraries are missing and regex-parameters are used then Kannel will die at runtime! I have tested the patch, but please review it nevertheless. Best regards, David Alexander Malysh wrote: patch commited to cvs. Known issue: kannel doesn't build on systems with missing 'regexp.h'. (imo) all modern systems has 'regexp.h' support. David is working on this issue... Thanks a lot to David! On Tuesday 20 January 2004 16:07, David Schmitz wrote: Hi, attached is a patch implementing some new configuration parameters based on POSIX regular expressions. All new parameters can be used in parallel with the non-regex-parameters. More elaborate documentation is included in the userdoc-part of the patch. Awaiting votes and comments, please. Regards, David PS: Modified files: gwlib/cfg.def gwlib/regex.[ch] gw/wap_push_ppg_pushuser.c gw/urltrans.[ch] gw/smscconn.c gw/smsbox.c gw/bb_smscconn.c gw/smscconn_p.h doc/userguide/userguide.xml The following params are new: Group: core white-list-regex black-list-regex Group: wap-push-user allowed-prefix-regex denied-prefix-regex white-list-regex black-list-regex Group: smsbox white-list-regex black-list-regex Group: smsc allowed-smsc-id-regex denied-smsc-id-regex preferred-smsc-id-regex allowed-prefix-regex denied-prefix-regex preferred-prefix-regex Group: sms-service accepted-smsc-regex allowed-prefix-regex denied-prefix-regex allowed-receiver-prefix-regex denied-receiver-prefix-regex white-list-regex black-list-regex keyword-regex Group: sendsms-user allowed-prefix-regex denied-prefix-regex white-list-regex black-list-regex -- Mit freundlichen Gruessen/Best regards David Schmitz Softwareentwicklung - Wapme Systems AG Vogelsanger Weg 80 40470 Düsseldorf Tel.: + 49 -211-7 48 45 - 2708 Fax: + 49 -211-80-6-06-2801 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de Index: gw/bb_smscconn.c === RCS file: /home/cvs/gateway/gw/bb_smscconn.c,v retrieving revision 1.72 diff -u -b -B -r1.72 bb_smscconn.c --- gw/bb_smscconn.c23 Jan 2004 14:56:06 - 1.72 +++ gw/bb_smscconn.c28 Jan 2004 10:55:39 - @@ -113,8 +113,8 @@ static Numhash *black_list; static Numhash *white_list; -static regex_t *white_list_regex = NULL; -static regex_t *black_list_regex = NULL; +static gw_regex_t *white_list_regex = NULL; +static gw_regex_t *black_list_regex = NULL; static long router_thread = -1; @@ -271,7 +271,7 @@ bb_alog_sms(conn, sms, "REJECTED - not white-regex-listed SMS"); msg_destroy(sms); return SMSCCONN_FAILED_REJECTED; -} +}; if (black_list && numhash_find_number(black_list, sms->sms.sender) == 1) { @@ -288,7 +288,7 @@ bb_alog_sms(conn, sms, "REJECTED - black-regex-listed SMS"); msg_destroy(sms); return SMSCCONN_FAILED_REJECTED; -} +}; if (sms->sms.sms_type != report_mo) sms->sms.sms_type = mo; @@ -451,6 +451,11 @@ panic(0, "Could not compile pattern '%s'", octstr_get_cstr(os)); octstr_destroy(os); } +if ((os = cfg_get(grp, octstr_imm("black-list-regex"))) != NULL) { +if ((black_list_regex = gw_regex_comp(os, REG_EXTENDED)) == NULL) +panic(0, "Could not compile pattern '%s'", octstr_get_cstr(os)); +octstr_destroy(os); +} smsc_groups = cfg_get_multi_group(cfg, octstr_imm("smsc")); /* Index: gw/smsbox.c === RCS file: /home/cvs/gateway/gw/smsbox.c,v retrieving revision 1.244 diff -u -b -B -r1.244 smsbox.c --- gw/smsbox.c 23 Jan 2004 14:56:06 - 1.244 +++ gw/smsbox.c 28 Jan 2004 10:55:40 - @@ -125,8 +125,8 @@ static int mo_recode = 0; static Numhash *white_list; static Numhash *black_list; -static regex_t *white_list_regex = NULL; -static regex_t *black_list_regex = NULL; +static gw_regex_t *white_list_regex = NULL; +static gw_regex_t *black_list_regex = NULL; static unsigned long max_http_retries = HTTP_MAX_RETRIES; static unsigned long http_queue_delay = HTTP_RETRY_DELAY; static Octstr *ppg_service_name = NULL; Index: gw/smscconn.c === RCS file: /home/cvs/gateway/gw/smscconn.c,v retrieving revision 1.44 diff -u -b -B -r1.44 smscconn.c --- gw/smscconn.c 23 Jan 2004 14:56:06 - 1.44 +++ gw/smscconn.c 28 Jan 2004 1