MNCC: do not send REL_IND twice

Add trans.cc.mncc_release_sent and skip MNCC_REL_IND if already true.

Related: SYS#5066
Change-Id: I449e1e4139af5f41da08ba9f6815ef74d8e13897
neels/codecs_fmtp
Neels Hofmeyr 11 months ago
parent 79461d1263
commit 7f4fd0f2a7
  1. 1
      include/osmocom/msc/transaction.h
  2. 16
      src/libmsc/gsm_04_08_cc.c
  3. 2
      src/libmsc/msc_a.c

@ -107,6 +107,7 @@ struct gsm_trans {
struct osmo_lcls *lcls;
/* Track codec choices from BSS and remote call leg */
struct codec_filter codecs;
bool mncc_release_sent; /* Mark when special error handling already did MNCC rel */
} cc;
struct {
struct gsm411_smc_inst smc_inst;

@ -237,6 +237,22 @@ static int _mncc_recvmsg(const char *file, int line, struct gsm_network *net, st
struct msgb *msg;
unsigned char *data;
switch (msg_type) {
case MNCC_DISC_IND:
case MNCC_REL_IND:
if (trans) {
if (trans->cc.mncc_release_sent) {
LOG_TRANS_CAT_SRC(trans, DMNCC, file, line, LOGL_DEBUG,
"Already released, skipping tx %s\n", get_mncc_name(msg_type));
return 0;
}
trans->cc.mncc_release_sent = true;
}
break;
default:
break;
}
LOG_TRANS_CAT_SRC(trans, DMNCC, file, line, LOGL_DEBUG, "tx %s\n", get_mncc_name(msg_type));
mncc->msg_type = msg_type;

@ -1835,6 +1835,8 @@ static int msc_a_start_assignment(struct msc_a *msc_a, struct gsm_trans *cc_tran
OSMO_ASSERT(!msc_a->cc.active_trans);
msc_a->cc.active_trans = cc_trans;
cc_trans->cc.mncc_release_sent = false;
OSMO_ASSERT(cc_trans && cc_trans->type == TRANS_CC);
cl = msc_a_ensure_call_leg(msc_a, cc_trans);
if (!cl)

Loading…
Cancel
Save