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

lynxis lazus gerrit-no-reply at lists.osmocom.org
Mon Jan 25 14:37:10 UTC 2021


lynxis lazus has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/23/22423/1

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-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210125/92a08d99/attachment.htm>


More information about the gerrit-log mailing list