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


Change subject: libmsc/gsm_04_11.c: also assign SM-RP-MR to MO transactions
......................................................................

libmsc/gsm_04_11.c: also assign SM-RP-MR to MO transactions

Previously, SM-RP Message Reference was assigned to MT transactions
only, but not to MO transactions. As a result, this could lead to
having a few transactions with duplicate SM-RP-MR value, because
in case of MO SMS, trans->sms.sm_rp_mr would remain 0x00.

Let's parse SM-RP-MR from MO SMS messages in gsm0411_rcv_sms(),
and assign it to the new transaction after allocation.

Change-Id: I4d07354175444f9764fb0dd6ea188a64494d79fe
---
M src/libmsc/gsm_04_11.c
1 file changed, 2 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/87/12687/1

diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c
index 4dc07bd..2f39b06 100644
--- a/src/libmsc/gsm_04_11.c
+++ b/src/libmsc/gsm_04_11.c
@@ -1179,6 +1179,7 @@
        struct gsm48_hdr *gh = msgb_l3(msg);
        uint8_t msg_type = gh->msg_type;
        uint8_t transaction_id = gsm48_hdr_trans_id_flip_ti(gh);
+       struct gsm411_rp_hdr *rph = (struct gsm411_rp_hdr *) gh->data;
        struct gsm_trans *trans;
        int new_trans = 0;
        int rc = 0;
@@ -1210,6 +1211,7 @@
                        return -ENOMEM;
                }

+               trans->sms.sm_rp_mr = rph->msg_ref; /* SM-RP Message Reference 
*/
                trans->dlci = OMSC_LINKID_CB(msg); /* DLCI as received from BSC 
*/

                new_trans = 1;

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4d07354175444f9764fb0dd6ea188a64494d79fe
Gerrit-Change-Number: 12687
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <[email protected]>

Reply via email to