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

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

pespin gerrit-no-reply at lists.osmocom.org
Fri Aug 30 10:41:27 UTC 2019


pespin has submitted this change and it was merged. ( 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(-)

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



diff --git a/src/gprs/sgsn_libgtp.c b/src/gprs/sgsn_libgtp.c
index 88b8d04..79d5543 100644
--- a/src/gprs/sgsn_libgtp.c
+++ b/src/gprs/sgsn_libgtp.c
@@ -649,8 +649,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: 2
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190830/d72d7ba5/attachment.htm>


More information about the gerrit-log mailing list