summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-08-17 17:57:58 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2017-08-17 17:58:02 +0200
commit5adb5c74050678eb57a4561e56864ee1a33b5cfb (patch)
treeb1e32ade1ddd7a2e29741c70f92dd6a4d614ca6a
parent69373b32014747b28cb972a0185e352516ce463a (diff)
esme: user_message_referece values should be smaller than 256
SMPP specs say message reference is 16 bits field. However, message reference field in GSM03.40 spec is only 8 bits. Change-Id: I52968a10089d14e0e3b0f9be678c261e3f92939c
-rw-r--r--src/osmo_gsm_tester/esme.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/osmo_gsm_tester/esme.py b/src/osmo_gsm_tester/esme.py
index c838841..9dbc5a3 100644
--- a/src/osmo_gsm_tester/esme.py
+++ b/src/osmo_gsm_tester/esme.py
@@ -145,7 +145,7 @@ class Esme(log.Origin):
seqs = []
self.log('Sending SMS "%s" to %s' % (str(sms_obj), sms_obj.dst_msisdn()))
umref = self.next_user_message_reference
- self.next_user_message_reference += 1
+ self.next_user_message_reference = (self.next_user_message_reference + 1) % (1 << 8)
for part in parts:
pdu = self.client.send_message(
source_addr_ton=smpplib.consts.SMPP_TON_INTL,