pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-gprs/+/32101 )


Change subject: gmm: Several fixes to GMMSM prim alloc functions
......................................................................

gmm: Several fixes to GMMSM prim alloc functions

Change-Id: Ie49cb448806101a24c58a85f7073e13baccada5b
---
M src/gmm/gmm_prim.c
1 file changed, 16 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/01/32101/1

diff --git a/src/gmm/gmm_prim.c b/src/gmm/gmm_prim.c
index 059c22a..c4de625 100644
--- a/src/gmm/gmm_prim.c
+++ b/src/gmm/gmm_prim.c
@@ -263,7 +263,7 @@

 /*** GMMSM ***/

-static inline struct osmo_gprs_gmm_prim *gmm_prim_gmmsm_alloc(enum 
osmo_gprs_gmm_gmmrr_prim_type type,
+static inline struct osmo_gprs_gmm_prim *gmm_prim_gmmsm_alloc(enum 
osmo_gprs_gmm_gmmsm_prim_type type,
                                                              enum 
osmo_prim_operation operation,
                                                              unsigned int 
extra_size)
 {
@@ -274,7 +274,7 @@
 struct osmo_gprs_gmm_prim *osmo_gprs_gmm_prim_alloc_gmmsm_establish_req(void)
 {
        struct osmo_gprs_gmm_prim *gmm_prim;
-       gmm_prim = gmm_prim_gmmrr_alloc(OSMO_GPRS_GMM_GMMSM_ESTABLISH, 
PRIM_OP_REQUEST, 0);
+       gmm_prim = gmm_prim_gmmsm_alloc(OSMO_GPRS_GMM_GMMSM_ESTABLISH, 
PRIM_OP_REQUEST, 0);
        return gmm_prim;
 }

@@ -282,16 +282,16 @@
 struct osmo_gprs_gmm_prim *gprs_gmm_prim_alloc_gmmsm_establish_cnf(uint8_t 
cause)
 {
        struct osmo_gprs_gmm_prim *gmm_prim;
-       gmm_prim = gmm_prim_gmmrr_alloc(OSMO_GPRS_GMM_GMMSM_ESTABLISH, 
PRIM_OP_CONFIRM, 0);
+       gmm_prim = gmm_prim_gmmsm_alloc(OSMO_GPRS_GMM_GMMSM_ESTABLISH, 
PRIM_OP_CONFIRM, 0);
        gmm_prim->gmmsm.establish_cnf.cause = cause;
        return gmm_prim;
 }

 /* 3GPP TS 24.007 9.5.1.4 GMMSM-RELEASE-IND:*/
-struct osmo_gprs_gmm_prim *gprs_gmm_prim_alloc_gmmrr_release_ind(void)
+struct osmo_gprs_gmm_prim *gprs_gmm_prim_alloc_gmmsm_release_ind(void)
 {
        struct osmo_gprs_gmm_prim *gmm_prim;
-       gmm_prim = gmm_prim_gmmrr_alloc(OSMO_GPRS_GMM_GMMSM_RELEASE, 
PRIM_OP_INDICATION, 0);
+       gmm_prim = gmm_prim_gmmsm_alloc(OSMO_GPRS_GMM_GMMSM_RELEASE, 
PRIM_OP_INDICATION, 0);
        return gmm_prim;
 }

@@ -299,7 +299,7 @@
 struct osmo_gprs_gmm_prim *osmo_gprs_gmm_prim_alloc_gmmsm_unitdata_req(uint8_t 
*smpdu, unsigned int smpdu_len)
 {
        struct osmo_gprs_gmm_prim *gmm_prim;
-       gmm_prim = gmm_prim_gmmrr_alloc(OSMO_GPRS_GMM_GMMSM_UNITDATA, 
PRIM_OP_REQUEST, 0);
+       gmm_prim = gmm_prim_gmmsm_alloc(OSMO_GPRS_GMM_GMMSM_UNITDATA, 
PRIM_OP_REQUEST, smpdu_len);
        gmm_prim->gmmsm.unitdata_req.smpdu = smpdu;
        gmm_prim->gmmsm.unitdata_req.smpdu_len = smpdu_len;
        return gmm_prim;
@@ -309,7 +309,7 @@
 struct osmo_gprs_gmm_prim *gprs_gmm_prim_alloc_gmmsm_unitdata_ind(uint8_t 
*smpdu, unsigned int smpdu_len)
 {
        struct osmo_gprs_gmm_prim *gmm_prim;
-       gmm_prim = gmm_prim_gmmrr_alloc(OSMO_GPRS_GMM_GMMSM_UNITDATA, 
PRIM_OP_INDICATION, 0);
+       gmm_prim = gmm_prim_gmmsm_alloc(OSMO_GPRS_GMM_GMMSM_UNITDATA, 
PRIM_OP_INDICATION, smpdu_len);
        gmm_prim->gmmsm.unitdata_ind.smpdu = smpdu;
        gmm_prim->gmmsm.unitdata_ind.smpdu_len = smpdu_len;
        return gmm_prim;

--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32101
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: Ie49cb448806101a24c58a85f7073e13baccada5b
Gerrit-Change-Number: 32101
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to