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/.
lynxis lazus gerrit-no-reply at lists.osmocom.orglynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/22911 )
Change subject: gprs_ns2_message: tx_status: move all cause dependent code into the switch/case
......................................................................
gprs_ns2_message: tx_status: move all cause dependent code into the switch/case
Change-Id: I8f1e0962c6f5f0c7287990bb7608d0cc9b86dfdb
---
M src/gb/gprs_ns2_message.c
1 file changed, 11 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/11/22911/1
diff --git a/src/gb/gprs_ns2_message.c b/src/gb/gprs_ns2_message.c
index 7f52c4b..ddf7285 100644
--- a/src/gb/gprs_ns2_message.c
+++ b/src/gb/gprs_ns2_message.c
@@ -450,18 +450,18 @@
msgb_tvlv_put(msg, NS_IE_CAUSE, 1, &cause);
- /* Section 9.2.7.1: Static conditions for NS-VCI */
- if (cause == NS_CAUSE_NSVC_BLOCKED ||
- cause == NS_CAUSE_NSVC_UNKNOWN)
- msgb_tvlv_put(msg, NS_IE_VCI, 2, (uint8_t *)&nsvci);
-
- /* Section 9.2.7.2: Static conditions for NS PDU */
switch (cause) {
+ case NS_CAUSE_NSVC_BLOCKED:
+ case NS_CAUSE_NSVC_UNKNOWN:
+ /* Section 9.2.7.1: Static conditions for NS-VCI */
+ msgb_tvlv_put(msg, NS_IE_VCI, 2, (uint8_t *)&nsvci);
+ break;
case NS_CAUSE_SEM_INCORR_PDU:
case NS_CAUSE_PDU_INCOMP_PSTATE:
case NS_CAUSE_PROTO_ERR_UNSPEC:
case NS_CAUSE_INVAL_ESSENT_IE:
case NS_CAUSE_MISSING_ESSENT_IE:
+ /* Section 9.2.7.2: Static conditions for NS PDU */
/* ensure the PDU doesn't exceed the MTU */
orig_len = msgb_l2len(orig_msg);
max_orig_len = msgb_length(msg) + TVLV_GROSS_LEN(orig_len);
@@ -469,14 +469,15 @@
orig_len -= max_orig_len - nsvc->bind->mtu;
msgb_tvlv_put(msg, NS_IE_PDU, orig_len, orig_msg->l2h);
break;
+ case NS_CAUSE_BVCI_UNKNOWN:
+ /* Section 9.2.7.3: Static conditions for BVCI */
+ msgb_tvlv_put(msg, NS_IE_VCI, 2, (uint8_t *)&bvci);
+ break;
+
default:
break;
}
- /* Section 9.2.7.3: Static conditions for BVCI */
- if (cause == NS_CAUSE_BVCI_UNKNOWN)
- msgb_tvlv_put(msg, NS_IE_VCI, 2, (uint8_t *)&bvci);
-
return ns_vc_tx(nsvc, msg);
}
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22911
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I8f1e0962c6f5f0c7287990bb7608d0cc9b86dfdb
Gerrit-Change-Number: 22911
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210215/69afb5b4/attachment.htm>