aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/lchan_fsm.c
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 /src/osmo-bsc/lchan_fsm.c
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
Diffstat (limited to 'src/osmo-bsc/lchan_fsm.c')
-rw-r--r--src/osmo-bsc/lchan_fsm.c15
1 files changed, 12 insertions, 3 deletions
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: