aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-12-08 21:19:57 +0100
committerHarald Welte <laforge@gnumonks.org>2016-12-13 14:54:01 +0000
commit814fef04b02a915412920b85bd44c25f8e47a79c (patch)
treeddad037be361f2815cf156b4760c1d74cdd1098b /openbsc/tests
parent3df5d53a0400a03a510f9d61a61368229e142d52 (diff)
gprs_gsup_client*: remove the gprs_ prefix
Make sure everything is named gsup_client_ / GSUP_CLIENT_. Rename static gsup_client_send() to client_send() to avoid clash with public gprs_gsup_client_send() being renamed to gsup_client_send(). This is in preparation for moving gsup to libcommon, which is in turn preparation for libvlr. libvlr and osmo-sgsn will use the same GSUP client code. A number of patches will follow up on this, also for the the OAP client. Related: OS#1592 Change-Id: I57433973b1c4f6cc1e12e7b1c96b5f719f418b51
Diffstat (limited to 'openbsc/tests')
-rw-r--r--openbsc/tests/sgsn/Makefile.am2
-rw-r--r--openbsc/tests/sgsn/sgsn_test.c28
2 files changed, 15 insertions, 15 deletions
diff --git a/openbsc/tests/sgsn/Makefile.am b/openbsc/tests/sgsn/Makefile.am
index 9ee5455e7..c5d90f6fd 100644
--- a/openbsc/tests/sgsn/Makefile.am
+++ b/openbsc/tests/sgsn/Makefile.am
@@ -36,7 +36,7 @@ sgsn_test_LDFLAGS = \
-Wl,--wrap=sgsn_update_subscriber_data \
-Wl,--wrap=gprs_subscr_request_update_location \
-Wl,--wrap=gprs_subscr_request_auth_info \
- -Wl,--wrap=gprs_gsup_client_send \
+ -Wl,--wrap=gsup_client_send \
$(NULL)
sgsn_test_LDADD = \
diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c
index e7b74585b..16eb6c9b2 100644
--- a/openbsc/tests/sgsn/sgsn_test.c
+++ b/openbsc/tests/sgsn/sgsn_test.c
@@ -146,14 +146,14 @@ int __wrap_gprs_subscr_request_auth_info(struct sgsn_mm_ctx *mmctx) {
return (*subscr_request_auth_info_cb)(mmctx);
};
-/* override, requires '-Wl,--wrap=gprs_gsup_client_send' */
-int __real_gprs_gsup_client_send(struct gprs_gsup_client *gsupc, struct msgb *msg);
-int (*gprs_gsup_client_send_cb)(struct gprs_gsup_client *gsupc, struct msgb *msg) =
- &__real_gprs_gsup_client_send;
+/* override, requires '-Wl,--wrap=gsup_client_send' */
+int __real_gsup_client_send(struct gsup_client *gsupc, struct msgb *msg);
+int (*gsup_client_send_cb)(struct gsup_client *gsupc, struct msgb *msg) =
+ &__real_gsup_client_send;
-int __wrap_gprs_gsup_client_send(struct gprs_gsup_client *gsupc, struct msgb *msg)
+int __wrap_gsup_client_send(struct gsup_client *gsupc, struct msgb *msg)
{
- return (*gprs_gsup_client_send_cb)(gsupc, msg);
+ return (*gsup_client_send_cb)(gsupc, msg);
};
static int count(struct llist_head *head)
@@ -714,7 +714,7 @@ static void test_subscriber_gsup(void)
cleanup_test();
}
-int my_gprs_gsup_client_send_dummy(struct gprs_gsup_client *gsupc, struct msgb *msg)
+int my_gsup_client_send_dummy(struct gsup_client *gsupc, struct msgb *msg)
{
msgb_free(msg);
return 0;
@@ -1281,7 +1281,7 @@ static void test_gmm_attach_subscr_gsup_auth(int retry)
cleanup_test();
}
-int my_gprs_gsup_client_send(struct gprs_gsup_client *gsupc, struct msgb *msg)
+int my_gsup_client_send(struct gsup_client *gsupc, struct msgb *msg)
{
struct osmo_gsup_message to_peer = {0};
struct osmo_gsup_message from_peer = {0};
@@ -1323,7 +1323,7 @@ int my_gprs_gsup_client_send(struct gprs_gsup_client *gsupc, struct msgb *msg)
return 0;
}
- reply_msg = gprs_gsup_msgb_alloc();
+ reply_msg = gsup_client_msgb_alloc();
reply_msg->l2h = reply_msg->data;
osmo_gsup_encode(reply_msg, &from_peer);
gprs_subscr_rx_gsup_message(reply_msg);
@@ -1338,9 +1338,9 @@ static void test_gmm_attach_subscr_real_gsup_auth(int retry)
struct gsm_subscriber *subscr;
sgsn_inst.cfg.auth_policy = SGSN_AUTH_POLICY_REMOTE;
- gprs_gsup_client_send_cb = my_gprs_gsup_client_send;
+ gsup_client_send_cb = my_gsup_client_send;
- sgsn->gsup_client = talloc_zero(tall_bsc_ctx, struct gprs_gsup_client);
+ sgsn->gsup_client = talloc_zero(tall_bsc_ctx, struct gsup_client);
if (retry) {
upd_loc_skip = 3;
@@ -1355,7 +1355,7 @@ static void test_gmm_attach_subscr_real_gsup_auth(int retry)
assert_no_subscrs();
sgsn->cfg.auth_policy = saved_auth_policy;
- gprs_gsup_client_send_cb = __real_gprs_gsup_client_send;
+ gsup_client_send_cb = __real_gsup_client_send;
upd_loc_skip = 0;
auth_info_skip = 0;
talloc_free(sgsn->gsup_client);
@@ -2239,7 +2239,7 @@ static void test_ggsn_selection(void)
printf("Testing GGSN selection\n");
- gprs_gsup_client_send_cb = my_gprs_gsup_client_send_dummy;
+ gsup_client_send_cb = my_gsup_client_send_dummy;
/* Check for emptiness */
OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi1) == NULL);
@@ -2358,7 +2358,7 @@ static void test_ggsn_selection(void)
sgsn_ggsn_ctx_free(ggcs[1]);
sgsn_ggsn_ctx_free(ggcs[2]);
- gprs_gsup_client_send_cb = __real_gprs_gsup_client_send;
+ gsup_client_send_cb = __real_gsup_client_send;
cleanup_test();
}