diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2019-10-05 04:19:36 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2019-11-01 17:35:17 +0100 |
commit | f439ff121fc02eea7a64dd2337eba6f1b9897989 (patch) | |
tree | 4c57fc73fdc42bfdad0a3897ce4c7c328e4505ea | |
parent | 84ce206ae3e36b7a8623c7fec32203a226812ad2 (diff) |
CC: add error handling for CRCX responses
Fix three 'FIXME: ERROR HANDLING' occurences in the code that reacts upon the
MGW providing (or failing to provide) an RTP port for the RAN side. From an
earlier stage of the code, the cleanup for this situation was extremely
complex, and hence the choice was to simply wait for the call to time out and
fail. But since we have implemented safe deallocation of nested FSMs in
libosmocore, the situation has become rather trivial: simply free the CC
transactions, and all the rest will immediately release, and terminate
correctly without crashing.
A ttcn3 test for this is MSC_Tests:TC_invalid_mgcp_crash, which actually also
needs the change to osmo_sockaddr_str_is_nonzero() in preceding patch
I53ddb19a70fda3deb906464e1b89c12d9b4c7cbd, so that a seemingly valid MGCP
message ends up causing a failure in the on_success() branch of
mgcp_client_endpoint_fsm.c.
Change-Id: I8313bed1d782100bebeac7d8fc040557c4cb653e
-rw-r--r-- | src/libmsc/msc_a.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index d99088e90..3c316ea85 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -523,7 +523,7 @@ static void msc_a_call_leg_ran_local_addr_available(struct msc_a *msc_a) if (mncc_bearer_cap_to_channel_type(&channel_type, &cc_trans->bearer_cap)) { LOG_MSC_A(msc_a, LOGL_ERROR, "Cannot compose Channel Type from bearer capabilities\n"); - /* FIXME: ERROR HANDLING */ + trans_free(cc_trans); return; } @@ -539,7 +539,7 @@ static void msc_a_call_leg_ran_local_addr_available(struct msc_a *msc_a) }; if (msc_a_ran_down(msc_a, MSC_ROLE_I, &msg)) { LOG_MSC_A(msc_a, LOGL_ERROR, "Cannot send Assignment\n"); - /* FIXME: ERROR HANDLING */ + trans_free(cc_trans); return; } } @@ -548,7 +548,7 @@ static void msc_a_call_leg_cn_local_addr_available(struct msc_a *msc_a, struct g { if (gsm48_tch_rtp_create(cc_trans)) { LOG_MSC_A(msc_a, LOGL_ERROR, "Cannot inform MNCC of RTP address\n"); - /* FIXME: ERROR HANDLING */ + trans_free(cc_trans); return; } } |