diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-06-09 21:48:49 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2012-05-02 19:24:21 +0200 |
commit | 2c7f7e6bf50e797715591e3a4d0991c1b821aa80 (patch) | |
tree | f9b795a3974a193dfbb1c8c4165cfdd84873e37c /openbsc/src/osmo-bsc_nat/bsc_nat_utils.c | |
parent | 1754842be6daec57106eeb480047e9204fc20eca (diff) |
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 <regex.h>
include to gsm_data. This header should be split up.
Diffstat (limited to 'openbsc/src/osmo-bsc_nat/bsc_nat_utils.c')
-rw-r--r-- | openbsc/src/osmo-bsc_nat/bsc_nat_utils.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c b/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c index 8658c3d9b..b8d6dbaac 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c @@ -672,31 +672,6 @@ int bsc_nat_filter_dt(struct bsc_connection *bsc, struct msgb *msg, } } -int bsc_parse_reg(void *ctx, regex_t *reg, char **imsi, int argc, const char **argv) -{ - int ret; - - ret = 0; - if (*imsi) { - talloc_free(*imsi); - *imsi = NULL; - } - regfree(reg); - - if (argc > 0) { - *imsi = talloc_strdup(ctx, argv[0]); - ret = regcomp(reg, argv[0], 0); - - /* handle compilation failures */ - if (ret != 0) { - talloc_free(*imsi); - *imsi = NULL; - } - } - - return ret; -} - static const char *con_types [] = { [NAT_CON_TYPE_NONE] = "n/a", [NAT_CON_TYPE_LU] = "Location Update", |