aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-03-25 12:11:38 +0800
committerHarald Welte <laforge@gnumonks.org>2010-03-25 12:11:38 +0800
commit52b4abdcb351830f5493a50c4181ef3947f3feab (patch)
tree3df286d1e10dbfe449206032cc9d627434799a41
parent9eb6d88d644c9e7d85177c39f12952fd2f4d9138 (diff)
replace rsl_rlm_cause_strs with rsl_rlm_cause_name()0.1.1
-rw-r--r--include/osmocore/rsl.h3
-rw-r--r--src/rsl.c11
2 files changed, 9 insertions, 5 deletions
diff --git a/include/osmocore/rsl.h b/include/osmocore/rsl.h
index c108081..99b90d6 100644
--- a/include/osmocore/rsl.h
+++ b/include/osmocore/rsl.h
@@ -16,9 +16,8 @@ uint8_t rsl_enc_chan_nr(uint8_t type, uint8_t subch, uint8_t timeslot);
/* decode channel number as per Section 9.3.1 */
int rsl_dec_chan_nr(uint8_t chan_nr, uint8_t *type, uint8_t *subch, uint8_t *timeslot);
-extern const struct value_string rsl_rlm_cause_strs[];
-
const char *rsl_err_name(uint8_t err);
+const char *rsl_rlm_cause_name(uint8_t err);
/* Section 3.3.2.3 TS 05.02. I think this looks like a table */
int rsl_ccch_conf_to_bs_cc_chans(int ccch_conf);
diff --git a/src/rsl.c b/src/rsl.c
index 1044b08..c002d33 100644
--- a/src/rsl.c
+++ b/src/rsl.c
@@ -211,7 +211,12 @@ static const struct value_string rsl_err_vals[] = {
{ 0, NULL }
};
-const struct value_string rsl_rlm_cause_strs[] = {
+const char *rsl_err_name(uint8_t err)
+{
+ return get_value_string(rsl_err_vals, err);
+}
+
+static const struct value_string rsl_rlm_cause_strs[] = {
{ RLL_CAUSE_T200_EXPIRED, "Timer T200 expired (N200+1) times" },
{ RLL_CAUSE_REEST_REQ, "Re-establishment request" },
{ RLL_CAUSE_UNSOL_UA_RESP, "Unsolicited UA response" },
@@ -229,9 +234,9 @@ const struct value_string rsl_rlm_cause_strs[] = {
{ 0, NULL },
};
-const char *rsl_err_name(uint8_t err)
+const char *rsl_rlm_cause_name(uint8_t err)
{
- return get_value_string(rsl_err_vals, err);
+ return get_value_string(rsl_rlm_cause_strs, err);
}
/* Section 3.3.2.3 TS 05.02. I think this looks like a table */