Change in osmo-ggsn[master]: Prevent Crash in show pdp-context from vty

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
Sun Oct 11 21:52:02 UTC 2020


pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/20534 )

Change subject: Prevent Crash in show pdp-context from vty
......................................................................


Patch Set 2:

(3 comments)

Please fix the cosmetic stuff and clarify the issue, then you have +2.

https://gerrit.osmocom.org/c/osmo-ggsn/+/20534/2//COMMIT_MSG 
Commit Message:

https://gerrit.osmocom.org/c/osmo-ggsn/+/20534/2//COMMIT_MSG@9 
PS2, Line 9: Don't compare EOF with 'true' which resulted in calling
This is confusing.
The crash doesn't come from comparing EOF as true, since EOF is actually defined as -1 here, so that's fine. The problem is the first call you modified which was checked wrongly (0 on success/found, EOF on not found)


https://gerrit.osmocom.org/c/osmo-ggsn/+/20534/2/ggsn/ggsn_vty.c 
File ggsn/ggsn_vty.c:

https://gerrit.osmocom.org/c/osmo-ggsn/+/20534/2/ggsn/ggsn_vty.c@917 
PS2, Line 917: 		if (0 == gtp_pdp_getimsi(ggsn->gsn, &pdp, imsi, nsapi)) {
rather compare against value on the right side, it's usually done like that since it's less confusing as if it was an assignment:
gtp_pdp_getimsi(ggsn->gsn, &pdp, imsi, nsapi) == 0

Also drop the comment, no need for that.


https://gerrit.osmocom.org/c/osmo-ggsn/+/20534/2/ggsn/ggsn_vty.c@924 
PS2, Line 924: 			if (EOF == gtp_pdp_getimsi(ggsn->gsn, &pdp, imsi, nsapi))
Same as above.



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

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: Ic40429939b185f97c020dd3904e054fe860b91e8
Gerrit-Change-Number: 20534
Gerrit-PatchSet: 2
Gerrit-Owner: keith <keith at rhizomatica.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Sun, 11 Oct 2020 21:52:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201011/b9038289/attachment.htm>


More information about the gerrit-log mailing list