aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-12-27 11:24:55 +0100
committerHarald Welte (local) <laflocal@hanuman.gnumonks.org>2009-12-27 14:56:53 +0100
commit27bd9dc01f1c90984a9c33ff4ff74160efd4b2b1 (patch)
tree7d356423d3a7b8b0333ef5629d0776d7b46d061d /openbsc
parent5c6ad79a42e06a4f9263fbe952c22e17057a4212 (diff)
move get_string_value() und get_value_string() into debug.c
this makes bsc_mgcp and ipaccess-proxy compile again
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/debug.c26
-rw-r--r--openbsc/src/gsm_data.c26
2 files changed, 26 insertions, 26 deletions
diff --git a/openbsc/src/debug.c b/openbsc/src/debug.c
index bc9230a93..dc270d86e 100644
--- a/openbsc/src/debug.c
+++ b/openbsc/src/debug.c
@@ -56,6 +56,32 @@ static struct debug_category default_categories[Debug_LastEntry] = {
[DREF] = { .enabled = 0, .loglevel = LOGL_NOTICE },
};
+const char *get_value_string(const struct value_string *vs, u_int32_t val)
+{
+ int i;
+
+ for (i = 0;; i++) {
+ if (vs[i].value == 0 && vs[i].str == NULL)
+ break;
+ if (vs[i].value == val)
+ return vs[i].str;
+ }
+ return "unknown";
+}
+
+int get_string_value(const struct value_string *vs, const char *str)
+{
+ int i;
+
+ for (i = 0;; i++) {
+ if (vs[i].value == 0 && vs[i].str == NULL)
+ break;
+ if (!strcasecmp(vs[i].str, str))
+ return vs[i].value;
+ }
+ return -EINVAL;
+}
+
struct debug_info {
const char *name;
const char *color;
diff --git a/openbsc/src/gsm_data.c b/openbsc/src/gsm_data.c
index 774a1ce2d..e216420c2 100644
--- a/openbsc/src/gsm_data.c
+++ b/openbsc/src/gsm_data.c
@@ -32,32 +32,6 @@
void *tall_bsc_ctx;
-const char *get_value_string(const struct value_string *vs, u_int32_t val)
-{
- int i;
-
- for (i = 0;; i++) {
- if (vs[i].value == 0 && vs[i].str == NULL)
- break;
- if (vs[i].value == val)
- return vs[i].str;
- }
- return "unknown";
-}
-
-int get_string_value(const struct value_string *vs, const char *str)
-{
- int i;
-
- for (i = 0;; i++) {
- if (vs[i].value == 0 && vs[i].str == NULL)
- break;
- if (!strcasecmp(vs[i].str, str))
- return vs[i].value;
- }
- return -EINVAL;
-}
-
void set_ts_e1link(struct gsm_bts_trx_ts *ts, u_int8_t e1_nr,
u_int8_t e1_ts, u_int8_t e1_ts_ss)
{