aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-11-27 01:30:50 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2018-11-27 01:35:15 +0100
commit369fba25deb479dcac0e90ae7ce8af69f1b869bc (patch)
tree83eef8504d0a8278f21dc894ceb7a31b88156e00
parent08155e90654c145737a5b5fe614ecf27aa725086 (diff)
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
-rw-r--r--include/osmocom/bsc/gsm_data.h1
-rw-r--r--src/osmo-bsc/lchan_fsm.c15
2 files changed, 13 insertions, 3 deletions
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index ba52c99b5..15158cdd0 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -501,6 +501,7 @@ struct gsm_lchan {
struct {
enum lchan_activate_mode activ_for;
bool activ_ack; /*< true as soon as RSL Chan Activ Ack is received */
+ bool immediate_assignment_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 71b40c117..5e99239c8 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -97,9 +97,17 @@ static void _lchan_on_activation_failure(struct gsm_lchan *lchan, enum lchan_act
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 @@ static void lchan_fsm_post_activ_ack(struct osmo_fsm_inst *fi)
return;
}
LOG_LCHAN(lchan, LOGL_DEBUG, "Tx RR Immediate Assignment\n");
+ lchan->activate.immediate_assignment_sent = true;
break;
case FOR_ASSIGNMENT: