Change in osmo-bsc[master]: handover test: fix dyn ts: set pchan_is on act / rel

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/.

neels gerrit-no-reply at lists.osmocom.org
Tue Nov 17 16:27:22 UTC 2020


neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/21196 )

Change subject: handover test: fix dyn ts: set pchan_is on act / rel
......................................................................

handover test: fix dyn ts: set pchan_is on act / rel

Before this, handover_test channel activation and release on dynamic timeslots
failed to reflect the correct pchan type that osmo-bsc uses.

Change-Id: I3284b4565ad2c3b124442f4373243da1518206ce
---
M tests/handover/handover_test.c
1 file changed, 33 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved



diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index 2aa48b7..6a24fde 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -318,6 +318,14 @@
 	/* serious hack into osmo_fsm */
 	lchan->fi->state = LCHAN_ST_ESTABLISHED;
 	lchan->ts->fi->state = TS_ST_IN_USE;
+
+	if (lchan->ts->pchan_on_init == GSM_PCHAN_TCH_F_TCH_H_PDCH)
+		lchan->ts->pchan_is = full_rate ? GSM_PCHAN_TCH_F : GSM_PCHAN_TCH_H;
+	if (lchan->ts->pchan_on_init == GSM_PCHAN_TCH_F_PDCH) {
+		OSMO_ASSERT(full_rate);
+		lchan->ts->pchan_is = GSM_PCHAN_TCH_F;
+	}
+
 	LOG_LCHAN(lchan, LOGL_DEBUG, "activated by handover_test.c\n");
 
 	create_conn(lchan);
@@ -491,6 +499,7 @@
 	struct e1inp_sign_link *sign_link = msg->dst;
 	int rc;
 	struct gsm_lchan *lchan = rsl_lchan_lookup(sign_link->trx, dh->chan_nr, &rc);
+	struct gsm_lchan *other_lchan;
 
 	if (rc) {
 		printf("rsl_lchan_lookup() failed\n");
@@ -507,6 +516,30 @@
 		rc = parse_chan_rel(lchan, dh->data);
 		if (rc == 0)
 			send_chan_act_ack(chan_req_lchan, 0);
+
+		/* send dyn TS back to PDCH if unused */
+		switch (chan_req_lchan->ts->pchan_on_init) {
+		case GSM_PCHAN_TCH_F_TCH_H_PDCH:
+		case GSM_PCHAN_TCH_F_PDCH:
+			switch (chan_req_lchan->ts->pchan_is) {
+			case GSM_PCHAN_TCH_H:
+				other_lchan = &chan_req_lchan->ts->lchan[
+					(chan_req_lchan == &chan_req_lchan->ts->lchan[0])?
+					1 : 0];
+				if (lchan_state_is(other_lchan, LCHAN_ST_ESTABLISHED))
+					break;
+				/* else fall thru */
+			case GSM_PCHAN_TCH_F:
+				chan_req_lchan->ts->pchan_is = GSM_PCHAN_PDCH;
+				break;
+			default:
+				break;
+			}
+			break;
+		default:
+			break;
+		}
+
 		break;
 	case RSL_MT_DATA_REQ:
 		rc = parse_ho_command(lchan, msg->l3h, msgb_l3len(msg));

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/21196
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I3284b4565ad2c3b124442f4373243da1518206ce
Gerrit-Change-Number: 21196
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201117/357bbe72/attachment.htm>


More information about the gerrit-log mailing list