From 88f9d98ccc2b8719b826d1a34c3aad8af3e4c132 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 30 Jul 2010 10:39:26 +0200 Subject: [PATCH] Use hexparse() from libosmocore >= 0.1.14 --- openbsc/configure.in | 2 +- openbsc/src/vty_interface_layer3.c | 28 +--------------------------- 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 #include #include +#include #include #include #include @@ -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= '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;