From 3ada5397d7b38c3fcda943a121496fd1c1197e52 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Thu, 23 Nov 2017 11:49:49 +0100 Subject: 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 --- src/osmo-bsc/osmo_bsc_mgcp.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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, -- cgit v1.2.3