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/.
Max gerrit-no-reply at lists.osmocom.orgMax has submitted this change and it was merged.
Change subject: gbproxy: ensure peer allocation result
......................................................................
gbproxy: ensure peer allocation result
gbproxy_peer_alloc() could return NULL which wasn't checked and used
right away. Fix it by making this assumption explicit with
OSMO_ASSERT(); While at it, also format log messages consistently.
Change-Id: Ib10c954e17a479baef31ded54370b35938e00018
---
M src/gprs/gb_proxy.c
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/gprs/gb_proxy.c b/src/gprs/gb_proxy.c
index eb2bbcc..17a0109 100644
--- a/src/gprs/gb_proxy.c
+++ b/src/gprs/gb_proxy.c
@@ -1018,9 +1018,9 @@
if (!from_peer) {
/* if a PTP-BVC is reset, and we don't know that
* PTP-BVCI yet, we should allocate a new peer */
- LOGP(DGPRS, LOGL_INFO, "Allocationg new peer for "
- "BVCI=%u via NSEI=%u\n", bvci, nsei);
+ LOGP(DGPRS, LOGL_INFO, "Allocationg new peer for BVCI=%u via NSEI=%u\n", bvci, nsei);
from_peer = gbproxy_peer_alloc(cfg, bvci);
+ OSMO_ASSERT(from_peer);
from_peer->nsei = nsei;
}
--
To view, visit https://gerrit.osmocom.org/3977
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib10c954e17a479baef31ded54370b35938e00018
Gerrit-PatchSet: 2
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>