aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc/smpp_openbsc.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2013-10-08 03:17:30 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-04-30 15:31:57 +0200
commitca3c256579a731b6b2bcea73478af1e0cadd1355 (patch)
tree1ecc55b57f6572f666e0850aa4bef8a417739c64 /openbsc/src/libmsc/smpp_openbsc.c
parent1b148ec1009c32faea269331836e366cfff7d18e (diff)
sms: Kill the sms->sender and use addr/ton/npi throughout the code
This is an incompatible database schema change. Store the type of the address in the database for both the sender and the receiver. Currently it is possible to use SMPP to store a SMS and the NPI and TON will be lost on the delivery of the SMS. The schema is changed to make the delivery always use the right NPI/TON. This patch is not ready for the master branch as there is no upgrade path for the HLR yet.
Diffstat (limited to 'openbsc/src/libmsc/smpp_openbsc.c')
-rw-r--r--openbsc/src/libmsc/smpp_openbsc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/openbsc/src/libmsc/smpp_openbsc.c b/openbsc/src/libmsc/smpp_openbsc.c
index ab558ce9d..ec541c271 100644
--- a/openbsc/src/libmsc/smpp_openbsc.c
+++ b/openbsc/src/libmsc/smpp_openbsc.c
@@ -133,7 +133,6 @@ static int submit_to_sms(struct gsm_sms **psms, struct gsm_network *net,
strncpy(sms->dst.addr, dest->extension, sizeof(sms->dst.addr)-1);
/* fill in the source address */
- sms->sender = subscr_get_by_id(net, 1);
sms->src.ton = submit->source_addr_ton;
sms->src.npi = submit->source_addr_npi;
strncpy(sms->src.addr, (char *)submit->source_addr, sizeof(sms->src.addr)-1);
@@ -475,13 +474,13 @@ static int deliver_to_esme(struct osmo_esme *esme, struct gsm_sms *sms,
deliver.source_addr_npi = NPI_Land_Mobile_E212;
snprintf((char *)deliver.source_addr,
sizeof(deliver.source_addr), "%s",
- sms->sender->imsi);
+ conn->subscr->imsi);
} else {
deliver.source_addr_ton = TON_Network_Specific;
deliver.source_addr_npi = NPI_ISDN_E163_E164;
snprintf((char *)deliver.source_addr,
sizeof(deliver.source_addr), "%s",
- sms->sender->extension);
+ conn->subscr->extension);
}
deliver.dest_addr_ton = sms->dst.ton;