aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc_nat/bsc_ussd.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-04-01 17:32:21 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-04-01 17:32:21 +0200
commita18b11602cb19198544a090078faaa0a826ec19c (patch)
treec4d7bf2172864e468f370f592aaf38f8bf92362c /openbsc/src/osmo-bsc_nat/bsc_ussd.c
parent9e7e55f16476c618869ed54590b77724aa1a9817 (diff)
nat: Make the USSD number matching a regexp
This allows to match multiple numbers and multiple patterns
Diffstat (limited to 'openbsc/src/osmo-bsc_nat/bsc_ussd.c')
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_ussd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_ussd.c b/openbsc/src/osmo-bsc_nat/bsc_ussd.c
index 14d154d0b..0dd0d8731 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_ussd.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_ussd.c
@@ -1,8 +1,8 @@
/* USSD Filter Code */
/*
- * (C) 2010 by Holger Hans Peter Freyther <zecke@selfish.org>
- * (C) 2010 by On-Waves
+ * (C) 2010-2011 by Holger Hans Peter Freyther <zecke@selfish.org>
+ * (C) 2010-2011 by On-Waves
* All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -352,7 +352,7 @@ int bsc_check_ussd(struct sccp_connections *con, struct bsc_nat_parsed *parsed,
if (req.text[0] == 0xff)
return 0;
- if (strcmp(req.text, con->bsc->nat->ussd_query) != 0)
+ if (regexec(&con->bsc->nat->ussd_query_re, req.text, 0, NULL, 0) == REG_NOMATCH)
return 0;
/* found a USSD query for our subscriber */