diff options
Diffstat (limited to 'openbsc/tests/sgsn/sgsn_test.c')
-rw-r--r-- | openbsc/tests/sgsn/sgsn_test.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c index 2c5e2b429..15c4c17d0 100644 --- a/openbsc/tests/sgsn/sgsn_test.c +++ b/openbsc/tests/sgsn/sgsn_test.c @@ -24,7 +24,7 @@ #include <openbsc/gprs_gmm.h> #include <openbsc/debug.h> #include <openbsc/gsm_subscriber.h> -#include <openbsc/gprs_gsup_messages.h> +#include <osmocom/gsm/gsup.h> #include <openbsc/gprs_gsup_client.h> #include <openbsc/gprs_utils.h> #include <openbsc/gprs_gb_parse.h> @@ -32,7 +32,6 @@ #include <osmocom/gprs/gprs_bssgp.h> #include <osmocom/gsm/gsm_utils.h> -#include <openbsc/gsm_04_08_gprs.h> #include <osmocom/core/application.h> #include <osmocom/core/msgb.h> @@ -617,8 +616,8 @@ static void test_subscriber_gsup(void) /* Inject InsertSubscrData GSUP message */ last_updated_subscr = NULL; rc = rx_gsup_message(insert_data_req, sizeof(insert_data_req)); - OSMO_ASSERT(rc == -GMM_CAUSE_MSGT_NOTEXIST_NOTIMPL); - OSMO_ASSERT(last_updated_subscr == NULL); + OSMO_ASSERT(rc = -ENOTSUP); /* not connected */ + OSMO_ASSERT(last_updated_subscr == s1); /* Inject DeleteSubscrData GSUP message */ last_updated_subscr = NULL; @@ -1138,7 +1137,7 @@ static void test_gmm_attach_subscr_fake_auth(void) int my_subscr_request_auth_info_real_auth(struct sgsn_mm_ctx *mmctx) { struct gsm_auth_tuple at = { - .sres = {0x51, 0xe5, 0x51, 0xe5}, + .vec.sres = {0x51, 0xe5, 0x51, 0xe5}, .key_seq = 0 }; @@ -1273,13 +1272,13 @@ static void test_gmm_attach_subscr_gsup_auth(int retry) int my_gprs_gsup_client_send(struct gprs_gsup_client *gsupc, struct msgb *msg) { - struct gprs_gsup_message to_peer = {0}; - struct gprs_gsup_message from_peer = {0}; + struct osmo_gsup_message to_peer = {0}; + struct osmo_gsup_message from_peer = {0}; struct msgb *reply_msg; int rc; /* Simulate the GSUP peer */ - rc = gprs_gsup_decode(msgb_data(msg), msgb_length(msg), &to_peer); + rc = osmo_gsup_decode(msgb_data(msg), msgb_length(msg), &to_peer); OSMO_ASSERT(rc >= 0); OSMO_ASSERT(to_peer.imsi[0] != 0); strncpy(from_peer.imsi, to_peer.imsi, sizeof(from_peer.imsi)); @@ -1288,16 +1287,16 @@ int my_gprs_gsup_client_send(struct gprs_gsup_client *gsupc, struct msgb *msg) msgb_free(msg); switch (to_peer.message_type) { - case GPRS_GSUP_MSGT_UPDATE_LOCATION_REQUEST: + case OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: /* Send UPDATE_LOCATION_RESULT */ return my_subscr_request_update_gsup_auth(NULL); - case GPRS_GSUP_MSGT_SEND_AUTH_INFO_REQUEST: + case OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST: /* Send SEND_AUTH_INFO_RESULT */ return my_subscr_request_auth_info_gsup_auth(NULL); - case GPRS_GSUP_MSGT_PURGE_MS_REQUEST: - from_peer.message_type = GPRS_GSUP_MSGT_PURGE_MS_RESULT; + case OSMO_GSUP_MSGT_PURGE_MS_REQUEST: + from_peer.message_type = OSMO_GSUP_MSGT_PURGE_MS_RESULT; break; default: @@ -1315,7 +1314,7 @@ int my_gprs_gsup_client_send(struct gprs_gsup_client *gsupc, struct msgb *msg) reply_msg = gprs_gsup_msgb_alloc(); reply_msg->l2h = reply_msg->data; - gprs_gsup_encode(reply_msg, &from_peer); + osmo_gsup_encode(reply_msg, &from_peer); gprs_subscr_rx_gsup_message(reply_msg); msgb_free(reply_msg); |