aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-01-18 20:15:29 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-01-18 20:15:29 +0100
commit47b144b00251969c30e6fcfaba1a6fe0c812db3b (patch)
tree2807eb9265e96e68e7b53d4c64456a0151b19ce8 /openbsc/src/osmo-bsc_nat/bsc_nat_utils.c
parent8e60f629e27f6a4cbb47479a1a69966c01890201 (diff)
nat: Internationalize the TP-DA if it starts with a 00
Internationalize the number like we do it for Call Control. Update the test result to match this new behavior.
Diffstat (limited to 'openbsc/src/osmo-bsc_nat/bsc_nat_utils.c')
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat_utils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c b/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c
index 36a7cfb07..96b937c2b 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c
@@ -1071,7 +1071,10 @@ static struct msgb *sms_create_new(uint8_t type, uint8_t ref,
msgb_v_put(out, data_ptr[1]);
/* encode the new number and put it */
- sms_encode_addr_element(out, new_dest_nr, 0x81, 1);
+ if (strncmp(new_dest_nr, "00", 2) == 0)
+ sms_encode_addr_element(out, new_dest_nr + 2, 0x91, 1);
+ else
+ sms_encode_addr_element(out, new_dest_nr, 0x81, 1);
/* Copy the rest after the TP-DS */
data = msgb_put(out, data_len - 2 - 1 - old_dest_len);