laforge has submitted this change. (
https://gerrit.osmocom.org/c/osmo-hnbgw/+/36250?usp=email )
(
2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: mgw_fsm: Add some OSMO_ASSERT() to ensure only CS maps passed
......................................................................
mgw_fsm: Add some OSMO_ASSERT() to ensure only CS maps passed
The mgw_fsm only supports CS RABs in the CS domain; let's add some
ASSERTs to make sure the impossible doesn't happen.
Change-Id: I264c4b3da17b6f59ebcdd02031318402a483041a
---
M src/osmo-hnbgw/mgw_fsm.c
1 file changed, 19 insertions(+), 0 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
Jenkins Builder: Verified
osmith: Looks good to me, approved
diff --git a/src/osmo-hnbgw/mgw_fsm.c b/src/osmo-hnbgw/mgw_fsm.c
index 6d23790..d0dc6df 100644
--- a/src/osmo-hnbgw/mgw_fsm.c
+++ b/src/osmo-hnbgw/mgw_fsm.c
@@ -807,6 +807,8 @@
struct mgw_fsm_priv *mgw_fsm_priv;
char fsm_name[255];
+ OSMO_ASSERT(!map->is_ps);
+
/* Initialize FSM if not done yet */
if (!initialized) {
OSMO_ASSERT(osmo_fsm_register(&mgw_fsm) == 0);
@@ -878,6 +880,7 @@
struct mgw_fsm_priv *mgw_fsm_priv;
OSMO_ASSERT(ranap_msg);
+ OSMO_ASSERT(!map->is_ps);
if (!map->mgw_fi) {
/* NOTE: This situation is a corner-case. We may end up here when the co-located MGW
caused a problem
@@ -916,6 +919,8 @@
* \returns 0 on success; negative on error. */
int mgw_fsm_release(struct hnbgw_context_map *map)
{
+ OSMO_ASSERT(!map->is_ps);
+
if (!map->mgw_fi)
return -EINVAL;
@@ -930,6 +935,8 @@
struct timespec elapsed;
uint64_t elapsed_ms;
+ OSMO_ASSERT(!map->is_ps);
+
if (!map->mgw_fi)
return 0;
--
To view, visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/36250?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I264c4b3da17b6f59ebcdd02031318402a483041a
Gerrit-Change-Number: 36250
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged