From ca114432be6c9e108f0f3182c564d264b78669e0 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 8 Feb 2014 15:20:48 +0100 Subject: sms: Increment the RP Message Reference for each transaction Each RP-DATA should have a unique msg reference. Currently 42 is used for all of these. Remember the last reference we used and increment it on the next SMS. Do not track if the reference is still in use a clash is a lot less likely now. First unless SMPP is used only one SMS is delivered at a time, second the transaction space is a lot smaller than the one for the reference. --- openbsc/include/openbsc/gsm_04_11.h | 2 ++ openbsc/include/openbsc/gsm_data.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'openbsc/include/openbsc') diff --git a/openbsc/include/openbsc/gsm_04_11.h b/openbsc/include/openbsc/gsm_04_11.h index 72b694825..00c3a19fa 100644 --- a/openbsc/include/openbsc/gsm_04_11.h +++ b/openbsc/include/openbsc/gsm_04_11.h @@ -37,4 +37,6 @@ int gsm411_send_sms_subscr(struct gsm_subscriber *subscr, int gsm411_send_sms(struct gsm_subscriber_connection *conn, struct gsm_sms *sms); void gsm411_sapi_n_reject(struct gsm_subscriber_connection *conn); + +uint8_t sms_next_rp_msg_ref(struct gsm_subscriber_connection *conn); #endif diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 41fe3281f..404dfe444 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -106,6 +106,8 @@ struct gsm_subscriber_connection { /* LU expiration handling */ uint8_t expire_timer_stopped; + /* SMS helpers for libmsc */ + uint8_t next_rp_ref; /* * Operations that have a state and might be pending -- cgit v1.2.3