Change in ...osmo-sgsn[master]: gtp: cb_delete_context(): Clarify why pdp->lib is set to NULL

pespin gerrit-no-reply at lists.osmocom.org
Thu Aug 29 12:24:36 UTC 2019


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15325


Change subject: gtp: cb_delete_context(): Clarify why pdp->lib is set to NULL
......................................................................

gtp: cb_delete_context(): Clarify why pdp->lib is set to NULL

Change-Id: I02c46062d6dc9802d9cae057587e66a68a65436c
---
M src/gprs/sgsn_libgtp.c
1 file changed, 3 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/25/15325/1

diff --git a/src/gprs/sgsn_libgtp.c b/src/gprs/sgsn_libgtp.c
index ac4b7b1..a8ad527 100644
--- a/src/gprs/sgsn_libgtp.c
+++ b/src/gprs/sgsn_libgtp.c
@@ -652,8 +652,9 @@
 
 	LOGPDPX(DGPRS, LOGL_INFO, pdp, "Context %p was deleted\n", pdp);
 
-	/* unlink the now non-existing library handle from the pdp
-	 * context */
+	/* unlink the now non-existing library handle from the pdp context.
+	   This way we avoid calling pdp_freepdp() on it, since after returning
+	   from cb_delete_context callback, libgtp is already doing so. */
 	pctx->lib = NULL;
 
 	sgsn_ggsn_ctx_drop_pdp(pctx);

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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I02c46062d6dc9802d9cae057587e66a68a65436c
Gerrit-Change-Number: 15325
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190829/03268a8b/attachment.html>


More information about the gerrit-log mailing list