[PATCH] libosmo-sccp[master]: SCCP SCOC: Ensure user primitive msgb->l2h always poinst to ...

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Apr 11 20:15:21 UTC 2017


Review at  https://gerrit.osmocom.org/2296

SCCP SCOC: Ensure user primitive msgb->l2h always poinst to tail

In case there is no user data in a CONNECT.conf primitive (or other CO
primitives), we must make sure that msgb->l2h = msgb->tail so that the
SCCP User can use msgb_l2len(msg) == 0 as indicator to verify if user
data is present or not.

Change-Id: Ie512fe063391e3a634097f555b9b0089d2981de9
---
M src/sccp_scoc.c
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/96/2296/1

diff --git a/src/sccp_scoc.c b/src/sccp_scoc.c
index b05e071..4bf340d 100644
--- a/src/sccp_scoc.c
+++ b/src/sccp_scoc.c
@@ -609,6 +609,7 @@
 	prim = (struct osmo_scu_prim *) msgb_put(upmsg, sizeof(*prim));
 	osmo_prim_init(&prim->oph, SCCP_SAP_USER,
 			primitive, operation, upmsg);
+	upmsg->l2h = upmsg->tail;
 	return prim;
 }
 

-- 
To view, visit https://gerrit.osmocom.org/2296
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie512fe063391e3a634097f555b9b0089d2981de9
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list