aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-04-15 12:11:09 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-04-15 12:11:09 +0200
commitb97ff243d02e8feae477c4be7510dd4ca203f394 (patch)
tree53042a6d5e29b4f868d84154c7e54835ea5578a1
parente2bd9eb37d8160b436a5a1bffc14690321f40ae6 (diff)
smpp: Fix SMS-receiver put assertionpespin/smpp2
-rw-r--r--src/libmsc/smpp_openbsc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libmsc/smpp_openbsc.c b/src/libmsc/smpp_openbsc.c
index 01c39f9..25d649b 100644
--- a/src/libmsc/smpp_openbsc.c
+++ b/src/libmsc/smpp_openbsc.c
@@ -151,7 +151,6 @@ static int submit_to_sms(struct gsm_sms **psms, struct gsm_network *net,
sms->msg_ref = msg_ref;
/* fill in the destination address */
- sms->receiver = dest;
sms->dst.ton = submit->dest_addr_ton;
sms->dst.npi = submit->dest_addr_npi;
if (dest)
@@ -159,6 +158,11 @@ static int submit_to_sms(struct gsm_sms **psms, struct gsm_network *net,
else
OSMO_STRLCPY_ARRAY(sms->dst.addr,
(const char *)submit->destination_addr);
+ if (dest) {
+ sms->receiver = dest;
+ vlr_subscr_get(sms->receiver, VSUB_USE_SMS_RECEIVER);
+ vlr_subscr_put(dest, VSUB_USE_SMPP);
+ }
/* fill in the source address */
sms->src.ton = submit->source_addr_ton;