Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/10326


Change subject: gsm/gsm0480.c: use the local msgb allocator
......................................................................

gsm/gsm0480.c: use the local msgb allocator

Change-Id: I23b4b0e1c237b9b27c1db1c9a824b5329d41a38b
---
M src/gsm/gsm0480.c
1 file changed, 8 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/26/10326/1

diff --git a/src/gsm/gsm0480.c b/src/gsm/gsm0480.c
index 5b51c75..3897743 100644
--- a/src/gsm/gsm0480.c
+++ b/src/gsm/gsm0480.c
@@ -125,13 +125,18 @@
        return 0;
 }

+struct msgb *gsm0480_msgb_alloc_name(const char *name)
+{
+       return msgb_alloc_headroom(1024, 128, name);
+}
+
 struct msgb *gsm0480_create_unstructuredSS_Notify(int alertPattern, const char 
*text)
 {
        struct msgb *msg;
        uint8_t *seq_len_ptr, *ussd_len_ptr, *data;
        int len;

-       msg = msgb_alloc_headroom(1024, 128, "GSM 04.80");
+       msg = gsm0480_msgb_alloc_name("TS 04.80 USSD Notify");
        if (!msg)
                return NULL;

@@ -177,7 +182,7 @@
        if (len < 1 || len > 160)
                return NULL;

-       msg = msgb_alloc_headroom(1024, 128, "GSM 04.80");
+       msg = gsm0480_msgb_alloc_name("TS 04.80 NotifySS");
        if (!msg)
                return NULL;

@@ -796,11 +801,6 @@
        return rc;
 }

-struct msgb *gsm0480_msgb_alloc_name(const char *name)
-{
-       return msgb_alloc_headroom(1024, 128, name);
-}
-
 /*! Generate a USSD ReturnResult component containing a string in default GSM 
alphabet.
  * \param[in] invoke_id                InvokeID of the request to which we 
respond
  * \param[in] text             USSD text in ASCII; to be encoded as GSM 7-but 
alphabet
@@ -962,7 +962,7 @@
 {
        struct msgb *msg;

-       msg = msgb_alloc_headroom(1024, 128, "GSM 04.80 USSD REL COMPL");
+       msg = gsm0480_msgb_alloc_name("TS 04.80 USSD REL COMPL");
        if (!msg)
                return NULL;


--
To view, visit https://gerrit.osmocom.org/10326
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I23b4b0e1c237b9b27c1db1c9a824b5329d41a38b
Gerrit-Change-Number: 10326
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <[email protected]>

Reply via email to