From b43baf20c571925cca16266482c4b5c325f41700 Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Wed, 10 Sep 2014 12:43:28 +0200 Subject: gprs: Don't discard SUSPEND/RESUME in bssgp_rcvmsg Currently sending SUSPEND/RESUME messages to this function (like it is done in the osmo-sgsn) results in STATUS messages complaining about an unknown BVCI. The reason is, that these messages rely on a TLLI/RAI pair to identify the context and do not contain an explicit BVCI. This patch modifies bssgp_rcvmsg() to only complain about and unknown BVCI if one is given but a matching context is not found (except for RESET messages). The ctx argument is removed from the functions handling SUSPEND and RESUME since it will always be NULL then. Sponsored-by: On-Waves ehf --- tests/gb/gprs_bssgp_test.c | 4 ++-- tests/gb/gprs_bssgp_test.ok | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/gb') diff --git a/tests/gb/gprs_bssgp_test.c b/tests/gb/gprs_bssgp_test.c index a2a40680..d24250db 100644 --- a/tests/gb/gprs_bssgp_test.c +++ b/tests/gb/gprs_bssgp_test.c @@ -116,10 +116,10 @@ static void test_bssgp_suspend_resume(void) memset(&last_oph, 0, sizeof(last_oph)); send_bssgp_supend(BSSGP_PDUT_SUSPEND, tlli); - /* OSMO_ASSERT(last_oph.primitive == PRIM_BSSGP_GMM_SUSPEND); */ + OSMO_ASSERT(last_oph.primitive == PRIM_BSSGP_GMM_SUSPEND); send_bssgp_resume(BSSGP_PDUT_RESUME, tlli); - /* OSMO_ASSERT(last_oph.primitive == PRIM_BSSGP_GMM_RESUME); */ + OSMO_ASSERT(last_oph.primitive == PRIM_BSSGP_GMM_RESUME); printf("----- %s END\n", __func__); } diff --git a/tests/gb/gprs_bssgp_test.ok b/tests/gb/gprs_bssgp_test.ok index 9c7b4c07..c9ec83d7 100644 --- a/tests/gb/gprs_bssgp_test.ok +++ b/tests/gb/gprs_bssgp_test.ok @@ -1,5 +1,7 @@ ===== BSSGP test START ----- test_bssgp_suspend_resume START +BSSGP primitive, SAP 16777219, prim = 3, op = 0, msg = 0b 1f 84 f0 12 34 56 1b 86 0f f1 80 20 37 00 +BSSGP primitive, SAP 16777219, prim = 4, op = 0, msg = 0e 1f 84 f0 12 34 56 1b 86 0f f1 80 20 37 00 1d 81 01 ----- test_bssgp_suspend_resume END ===== BSSGP test END -- cgit v1.2.3