Change in osmocom-bb[master]: trxcon/l1ctl: fix: send confirmation for TCH mode request

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

laforge gerrit-no-reply at lists.osmocom.org
Mon Oct 19 14:54:22 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/20787 )

Change subject: trxcon/l1ctl: fix: send confirmation for TCH mode request
......................................................................

trxcon/l1ctl: fix: send confirmation for TCH mode request

Both REQ and CNF share the same message structure, so we can
cheat a bit by changing the message type and sending it back.

Change-Id: I6f403ed0506b4b1872361d9976d3186bfe514b52
Related: OS#4799
---
M src/host/trxcon/l1ctl.c
1 file changed, 5 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c
index aec304f..8083595 100644
--- a/src/host/trxcon/l1ctl.c
+++ b/src/host/trxcon/l1ctl.c
@@ -808,8 +808,11 @@
 
 	/* TODO: do we need to care about audio_mode? */
 
-	msgb_free(msg);
-	return 0;
+	/* Re-use the original message as confirmation */
+	struct l1ctl_hdr *l1h = (struct l1ctl_hdr *) msg->data;
+	l1h->msg_type = L1CTL_TCH_MODE_CONF;
+
+	return l1ctl_link_send(l1l, msg);
 }
 
 static int l1ctl_rx_crypto_req(struct l1ctl_link *l1l, struct msgb *msg)

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I6f403ed0506b4b1872361d9976d3186bfe514b52
Gerrit-Change-Number: 20787
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
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/20201019/c593fa0d/attachment.htm>


More information about the gerrit-log mailing list