aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2023-03-07 09:45:11 +0100
committerOliver Smith <osmith@sysmocom.de>2023-03-07 09:50:01 +0100
commita8f5dbce77ce95a601987db00f0ad9a1d4b47458 (patch)
treee5e2cf07a310b1893fd9401d5d1811845fc178af
parentf85f8dd4a173a1e5f2ef101f082b281bb47fda35 (diff)
check_chan_mode_rate_against…: fix never true cond
Fixes: CID#310958 Fixes: 2150b307 ("assignment_fsm: chan mode check: support CSD") Change-Id: Icb3d0f977267dca7b52fd05312ccb5237fcaa031
-rw-r--r--src/osmo-bsc/assignment_fsm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c
index 3d4c38f6a..e21a03628 100644
--- a/src/osmo-bsc/assignment_fsm.c
+++ b/src/osmo-bsc/assignment_fsm.c
@@ -397,22 +397,22 @@ static int check_chan_mode_rate_against_ch_indctr(struct gsm_subscriber_connecti
struct assignment_request *req = &conn->assignment.req;
struct osmo_fsm_inst *fi = conn->fi;
int i;
- uint8_t ch_indctr;
+ int rc;
for (i = 0; i < req->n_ch_mode_rate; i++) {
- ch_indctr = chan_mode_to_ch_indctr(req->ch_mode_rate_list[i].chan_mode);
- if (ch_indctr < 0) {
+ rc = chan_mode_to_ch_indctr(req->ch_mode_rate_list[i].chan_mode);
+ if (rc < 0) {
assignment_fail(GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_NOT_SUPP,
"Channel mode not supported (prev level %d): %s", i,
gsm48_chan_mode_name(req->ch_mode_rate_list[i].chan_mode));
return -EINVAL;
}
- if (ch_indctr != req->ch_indctr) {
+ if (rc != req->ch_indctr) {
assignment_fail(GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_NOT_SUPP,
"Channel mode %s has ch_indctr %d, channel type has ch_indctr %d",
gsm48_chan_mode_name(req->ch_mode_rate_list[i].chan_mode),
- ch_indctr, req->ch_indctr);
+ rc, req->ch_indctr);
return -EINVAL;
}
}