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
changes/53/15853/2
Neels Hofmeyr 3 years ago
parent 84ce206ae3
commit f439ff121f
  1. 6
      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;
}
}

Loading…
Cancel
Save