Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/11940
Change subject: send Immediate Assignment Reject only before Immediate Assignment ...................................................................... send Immediate Assignment Reject only before Immediate Assignment Set flag lchan->activate.immediate_assignment_sent to true when sending, and omit a reject after that. lchan->activate gets completely zeroed in lchan_reset(), which sets that flag back to false whenever an lchan becomes inactive. Related: OS#3709 Change-Id: I9ad094d272254d7aee9b0a676201d4ed8cd727ca --- M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/lchan_fsm.c 2 files changed, 13 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/40/11940/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index ba52c99..c67edd0 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -501,6 +501,7 @@ struct { enum lchan_activate_mode activ_for; bool activ_ack; /*< true as soon as RSL Chan Activ Ack is received */ + bool immediate_assignment_sent; /*< true as soon as an Immediate Assignment was sent */ /*! This flag ensures that when an lchan activation has succeeded, and we have already * sent ACKs like Immediate Assignment or BSSMAP Assignment Complete, and if other errors * occur later, e.g. during release, that we don't send a NACK out of context. */ diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c index 71b40c1..5e99239 100644 --- a/src/osmo-bsc/lchan_fsm.c +++ b/src/osmo-bsc/lchan_fsm.c @@ -97,9 +97,17 @@ switch (activ_for) { case FOR_MS_CHANNEL_REQUEST: - LOG_LCHAN(lchan, LOGL_NOTICE, "Tx Immediate Assignment Reject (%s)\n", - lchan->last_error ? : "unknown error"); - rsl_tx_imm_ass_rej(lchan->ts->trx->bts, lchan->rqd_ref); + if (lchan->activate.immediate_assignment_sent) { + LOG_LCHAN(lchan, LOGL_ERROR, + "lchan activation failed, after Immediate Assignment message was sent (%s)\n", + lchan->last_error ? : "unknown error"); + /* Likely the MS never showed up. Just tear down the lchan. */ + } else { + /* Failure before Immediate Assignment message, send a reject. */ + LOG_LCHAN(lchan, LOGL_NOTICE, "Tx Immediate Assignment Reject (%s)\n", + lchan->last_error ? : "unknown error"); + rsl_tx_imm_ass_rej(lchan->ts->trx->bts, lchan->rqd_ref); + } break; case FOR_ASSIGNMENT: @@ -713,6 +721,7 @@ return; } LOG_LCHAN(lchan, LOGL_DEBUG, "Tx RR Immediate Assignment\n"); + lchan->activate.immediate_assignment_sent = true; break; case FOR_ASSIGNMENT: -- To view, visit https://gerrit.osmocom.org/11940 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I9ad094d272254d7aee9b0a676201d4ed8cd727ca Gerrit-Change-Number: 11940 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr <nhofm...@sysmocom.de>