[MERGED] osmo-bsc[master]: GSCON FSM: Fix argument order when calling gsm0808_assign_req()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Mar 22 15:15:13 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: GSCON FSM: Fix argument order when calling gsm0808_assign_req()
......................................................................


GSCON FSM: Fix argument order when calling gsm0808_assign_req()

The first argument is the channel mode (codec), the second one is
a flag whether or not it's a full-rate channel.

Before this patch the two arguments are reversed, resulting in
* all assignments being TCH/F in general
* all assignments have FR1 as codec, as the full_Rate=1 is interpreted as FR1

Change-Id: I80f2a016a7646252bce8d86ed0bab236f3adbfca
Related: OS#3094
---
M src/libbsc/bsc_subscr_conn_fsm.c
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libbsc/bsc_subscr_conn_fsm.c b/src/libbsc/bsc_subscr_conn_fsm.c
index dc088a1..9d23dd5 100644
--- a/src/libbsc/bsc_subscr_conn_fsm.c
+++ b/src/libbsc/bsc_subscr_conn_fsm.c
@@ -345,7 +345,8 @@
 			 * conn->user_plane.chan_mode parameter that this
 			 * assignment is for a signalling channel and will then
 			 * change back to ST_ACTIVE (here) immediately. */
-			rc = gsm0808_assign_req(conn, conn->user_plane.full_rate, conn->user_plane.chan_mode);
+			rc = gsm0808_assign_req(conn, conn->user_plane.chan_mode,
+						conn->user_plane.full_rate);
 			if (rc != 0) {
 				resp = gsm0808_create_assignment_failure(GSM0808_CAUSE_EQUIPMENT_FAILURE, NULL);
 				sigtran_send(conn, resp, fi);
@@ -437,7 +438,7 @@
 		 * then start the channel assignment. */
 		conn->user_plane.rtp_port = conn_peer->port;
 		conn->user_plane.rtp_ip = osmo_ntohl(inet_addr(conn_peer->addr));
-		rc = gsm0808_assign_req(conn, conn->user_plane.full_rate, conn->user_plane.chan_mode);
+		rc = gsm0808_assign_req(conn, conn->user_plane.chan_mode, conn->user_plane.full_rate);
 		if (rc != 0) {
 			resp = gsm0808_create_assignment_failure(GSM0808_CAUSE_RQSTED_SPEECH_VERSION_UNAVAILABLE, NULL);
 			sigtran_send(conn, resp, fi);

-- 
To view, visit https://gerrit.osmocom.org/7433
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I80f2a016a7646252bce8d86ed0bab236f3adbfca
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list