aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-11-23 11:49:49 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2017-12-01 13:36:30 +0100
commit3ada5397d7b38c3fcda943a121496fd1c1197e52 (patch)
tree43de61899040d7e63451521083bca2c9e489a6bb
parentfa85d18807452045a36fc3a80b7f35d5ba8422b8 (diff)
mgcp: add missing switch case
In the beginning of the CRCX phase for the network does not distinguish between EV_MDCX_BTS_RES and EV_TEARDOWN, so a Teardown due to an error could be misinterpreted as a successful MGW response. Add missing case statement to distinguish CV_MDCX_BTS_RES from EV_TEARDOWN. Change-Id: I9bf49df167d94b33ad65d8b9382a01f160b5aec0
-rw-r--r--src/osmo-bsc/osmo_bsc_mgcp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c
index a7d1f9455..be6c7ded9 100644
--- a/src/osmo-bsc/osmo_bsc_mgcp.c
+++ b/src/osmo-bsc/osmo_bsc_mgcp.c
@@ -456,6 +456,14 @@ static void fsm_crcx_net_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data
"fsm-state: %s, fsm-event: %s\n",
get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event));
+ switch (event) {
+ case EV_MDCX_BTS_RESP:
+ break;
+ default:
+ handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN);
+ return;
+ }
+
rtp_endpoint = mgcp_ctx->rtp_endpoint;
LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG,