aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs/gb_proxy_patch.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-08-12 13:43:54 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-08-27 17:40:55 +0200
commit7e82b74c752a1581f7dfe0d6923293cecf062428 (patch)
tree974f43134922087eca86272f9e0f365838b3c5a1 /src/gprs/gb_proxy_patch.c
parentdfbd2c88d2b124a2db5771ceb903422e55699149 (diff)
Migrate from gprs_apn_to_str() to libosmocore osmo_apn_to_str()
In 2015, Jacob moved/copied related functions to libosmocore, but for some reason didn't remove the copies here. Let's follow-up on that and remove duplicated code. The libosmocore commit introducing osmo_apn_to_str() was 8114294bf29ac6e44822c0ae43d4b0819f11b022 Change-Id: I7315ffcbed8a54cca2056f313bb7783ad82d0ee9
Diffstat (limited to 'src/gprs/gb_proxy_patch.c')
-rw-r--r--src/gprs/gb_proxy_patch.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gprs/gb_proxy_patch.c b/src/gprs/gb_proxy_patch.c
index 7bddc449..210fb2b9 100644
--- a/src/gprs/gb_proxy_patch.c
+++ b/src/gprs/gb_proxy_patch.c
@@ -28,6 +28,7 @@
#include <osmocom/gprs/protocol/gsm_08_18.h>
#include <osmocom/core/rate_ctr.h>
+#include <osmocom/gsm/apn.h>
/* patch RA identifier in place */
static void gbproxy_patch_raid(uint8_t *raid_enc, struct gbproxy_peer *peer,
@@ -101,7 +102,7 @@ static void gbproxy_patch_apn_ie(struct msgb *msg,
LOGP(DGPRS, LOGL_DEBUG,
"Patching %s to SGSN: Removing APN '%s'\n",
log_text,
- gprs_apn_to_str(str1, apn, apn_len));
+ osmo_apn_to_str(str1, apn, apn_len));
*new_apn_ie_len = 0;
gprs_msgb_resize_area(msg, apn_ie, apn_ie_len, 0);
@@ -116,8 +117,8 @@ static void gbproxy_patch_apn_ie(struct msgb *msg,
"Patching %s to SGSN: "
"Replacing APN '%s' -> '%s'\n",
log_text,
- gprs_apn_to_str(str1, apn, apn_len),
- gprs_apn_to_str(str2, peer->cfg->core_apn,
+ osmo_apn_to_str(str1, apn, apn_len),
+ osmo_apn_to_str(str2, peer->cfg->core_apn,
peer->cfg->core_apn_size));
*new_apn_ie_len = peer->cfg->core_apn_size + 2;