From 06c9da6c22f674c86e16e1c4dde9932a49b8cbea Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 9 Jun 2011 21:48:49 +0200 Subject: misc: Move the bsc_parse_reg to libcommom and name it gsm_parse_reg Move the regexp parsing code from the NAT to libcommon as it will be used by the NAT and BSC code. This also adds the #include include to gsm_data. This header should be split up. --- openbsc/src/osmo-bsc_nat/bsc_nat_vty.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'openbsc/src/osmo-bsc_nat/bsc_nat_vty.c') diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c index b5c1cf287..55b3958c0 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c @@ -19,6 +19,7 @@ */ #include +#include #include #include #include @@ -527,7 +528,7 @@ DEFUN(cfg_nat_ussd_query, "Set the USSD query to match with the ussd-list-name\n" "The query to match") { - if (bsc_parse_reg(_nat, &_nat->ussd_query_re, &_nat->ussd_query, argc, argv) != 0) + if (gsm_parse_reg(_nat, &_nat->ussd_query_re, &_nat->ussd_query, argc, argv) != 0) return CMD_WARNING; return CMD_SUCCESS; } @@ -641,7 +642,7 @@ DEFUN(cfg_lst_imsi_allow, if (!entry) return CMD_WARNING; - if (bsc_parse_reg(acc, &entry->imsi_allow_re, &entry->imsi_allow, argc - 1, &argv[1]) != 0) + if (gsm_parse_reg(acc, &entry->imsi_allow_re, &entry->imsi_allow, argc - 1, &argv[1]) != 0) return CMD_WARNING; return CMD_SUCCESS; } @@ -664,7 +665,7 @@ DEFUN(cfg_lst_imsi_deny, if (!entry) return CMD_WARNING; - if (bsc_parse_reg(acc, &entry->imsi_deny_re, &entry->imsi_deny, argc - 1, &argv[1]) != 0) + if (gsm_parse_reg(acc, &entry->imsi_deny_re, &entry->imsi_deny, argc - 1, &argv[1]) != 0) return CMD_WARNING; return CMD_SUCCESS; } @@ -797,7 +798,7 @@ DEFUN(test_regex, test_regex_cmd, char *str = NULL; memset(®, 0, sizeof(reg)); - if (bsc_parse_reg(_nat, ®, &str, 1, argv) != 0) + if (gsm_parse_reg(_nat, ®, &str, 1, argv) != 0) return CMD_WARNING; vty_out(vty, "String matches allow pattern: %d%s", -- cgit v1.2.3