summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-07-28 22:55:43 +0200
committerHarald Welte <laforge@gnumonks.org>2018-07-29 14:39:36 +0000
commit88fa5a3e1ee82f456ad121ddfab65e4d76fc14cb (patch)
tree55a56a6fcb15df07b7574e3160f0b2192ffe0c30 /src
parent49865053bc47c00ea50b6cee2eeecf61c2dd2fdb (diff)
gsm0480: Factor out msgb allocation helper function
Change-Id: If25b467481023eadaaf3f78157eceff4b81d24d2
Diffstat (limited to 'src')
-rw-r--r--src/gsm/gsm0480.c7
-rw-r--r--src/gsm/libosmogsm.map1
2 files changed, 7 insertions, 1 deletions
diff --git a/src/gsm/gsm0480.c b/src/gsm/gsm0480.c
index 165b309f..ac0fa125 100644
--- a/src/gsm/gsm0480.c
+++ b/src/gsm/gsm0480.c
@@ -787,13 +787,18 @@ static int parse_ss_for_bs_req(const uint8_t *ss_req_data,
return rc;
}
+struct msgb *gsm0480_msgb_alloc_name(const char *name)
+{
+ return msgb_alloc_headroom(1024, 128, name);
+}
+
struct msgb *gsm0480_create_ussd_resp(uint8_t invoke_id, uint8_t trans_id, const char *text)
{
struct msgb *msg;
uint8_t *ptr8;
int response_len;
- msg = msgb_alloc_headroom(1024, 128, "GSM 04.80");
+ msg = gsm0480_msgb_alloc_name("TS 04.80 USSD Resp");
if (!msg)
return NULL;
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index 3b403c2b..312c9901 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -97,6 +97,7 @@ gsm0480_wrap_facility;
gsm0480_wrap_invoke;
gsm0480_comp_type_names;
gsm0480_op_code_names;
+gsm0480_msgb_alloc_name;
gsm0502_calc_paging_group;