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
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;