Change in libosmocore[master]: gprs_ns2: always pass a tp to gprs_ns2_vc_rx

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 Jan 25 17:15:46 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/22423 )

Change subject: gprs_ns2: always pass a tp to gprs_ns2_vc_rx
......................................................................

gprs_ns2: always pass a tp to gprs_ns2_vc_rx

In preparation of checking the NSEI/NSVCI in ns2_vc_rx. It
makes the function less error prone as the *tp is always defined.

Change-Id: I3cd6ed20cdc1390075669e1d0101154c51f3997f
---
M src/gb/gprs_ns2.c
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c
index ec60dbd..451290b 100644
--- a/src/gb/gprs_ns2.c
+++ b/src/gb/gprs_ns2.c
@@ -1047,7 +1047,7 @@
 		struct msgb *msg)
 {
 	struct gprs_ns_hdr *nsh = (struct gprs_ns_hdr *) msg->l2h;
-	struct tlv_parsed tp;
+	struct tlv_parsed tp = { };
 	int rc = 0;
 
 	log_set_context(LOG_CTX_GB_NSE, nsvc->nse);
@@ -1099,7 +1099,7 @@
 		break;
 
 	case NS_PDUT_UNITDATA:
-		rc = gprs_ns2_vc_rx(nsvc, msg, NULL);
+		rc = gprs_ns2_vc_rx(nsvc, msg, &tp);
 		break;
 	default:
 		rc = ns2_tlv_parse(&tp, nsh->data,

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3cd6ed20cdc1390075669e1d0101154c51f3997f
Gerrit-Change-Number: 22423
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210125/27f259ad/attachment.htm>


More information about the gerrit-log mailing list