summaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-07-30 10:39:26 +0200
committerHarald Welte <laforge@gnumonks.org>2010-07-30 10:39:26 +0200
commit88f9d98ccc2b8719b826d1a34c3aad8af3e4c132 (patch)
treeae273a3cd971c762b5a4995c7792d305187f5dfc /openbsc
parent417920a66098b67c45bb1774148a21de6b5ba07d (diff)
Use hexparse() from libosmocore >= 0.1.14
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/configure.in2
-rw-r--r--openbsc/src/vty_interface_layer3.c28
2 files changed, 2 insertions, 28 deletions
diff --git a/openbsc/configure.in b/openbsc/configure.in
index f2cb3e42d..f43f6e61b 100644
--- a/openbsc/configure.in
+++ b/openbsc/configure.in
@@ -22,7 +22,7 @@ AC_SEARCH_LIBS(gtp_new, gtp,
AM_CONDITIONAL(HAVE_LIBGTP, test "x$GPRS_LIBGTP" != "x")
-PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.1.13)
+PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.1.14)
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.1.9)
dnl checks for header files
diff --git a/openbsc/src/vty_interface_layer3.c b/openbsc/src/vty_interface_layer3.c
index 55fe1c065..fbb93c884 100644
--- a/openbsc/src/vty_interface_layer3.c
+++ b/openbsc/src/vty_interface_layer3.c
@@ -37,6 +37,7 @@
#include <openbsc/e1_input.h>
#include <openbsc/abis_nm.h>
#include <osmocore/gsm_utils.h>
+#include <osmocore/utils.h>
#include <openbsc/db.h>
#include <osmocore/talloc.h>
#include <openbsc/signal.h>
@@ -47,33 +48,6 @@
extern struct gsm_network *gsmnet_from_vty(struct vty *v);
-static int hexparse(const char *str, u_int8_t *b, int max_len)
-
-{
- int i, l, v;
-
- l = strlen(str);
- if ((l&1) || ((l>>1) > max_len))
- return -1;
-
- memset(b, 0x00, max_len);
-
- for (i=0; i<l; i++) {
- char c = str[i];
- if (c >= '0' && c <= '9')
- v = c - '0';
- else if (c >= 'a' && c <= 'f')
- v = 10 + (c - 'a');
- else if (c >= 'A' && c <= 'F')
- v = 10 + (c - 'A');
- else
- return -1;
- b[i>>1] |= v << (i&1 ? 0 : 4);
- }
-
- return i>>1;
-}
-
static void subscr_dump_full_vty(struct vty *vty, struct gsm_subscriber *subscr)
{
int rc;