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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/21559 )
Change subject: gb_proxy: cosmetic: Use function rather than open-coding is_sgsn
......................................................................
gb_proxy: cosmetic: Use function rather than open-coding is_sgsn
Change-Id: Id41d74ebd41e5084377a986f4a1acd53cae12bc1
---
M src/gbproxy/gb_proxy.c
1 file changed, 8 insertions(+), 7 deletions(-)
Approvals:
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/gbproxy/gb_proxy.c b/src/gbproxy/gb_proxy.c
index 74f799d..98fa928 100644
--- a/src/gbproxy/gb_proxy.c
+++ b/src/gbproxy/gb_proxy.c
@@ -83,6 +83,12 @@
static int gbprox_relay2sgsn(struct gbproxy_config *cfg, struct msgb *old_msg,
uint16_t ns_bvci, uint16_t sgsn_nsei);
+
+static int gbproxy_is_sgsn_nsei(struct gbproxy_config *cfg, uint16_t nsei)
+{
+ return nsei == cfg->nsip_sgsn_nsei;
+}
+
static int check_bvc_nsei(struct gbproxy_bvc *bvc, uint16_t nsei)
{
OSMO_ASSERT(bvc);
@@ -726,11 +732,6 @@
return bssgp_tx_status(BSSGP_CAUSE_INV_MAND_INF, NULL, orig_msg);
}
-static int gbproxy_is_sgsn_nsei(struct gbproxy_config *cfg, uint16_t nsei)
-{
- return nsei == cfg->nsip_sgsn_nsei;
-}
-
int gbprox_bssgp_send_cb(void *ctx, struct msgb *msg)
{
int rc;
@@ -800,7 +801,7 @@
case NS_AFF_CAUSE_RECOVERY:
LOGP(DPCU, LOGL_NOTICE, "NS-NSE %d became available\n", nsp->nsei);
- if (nsp->nsei == cfg->nsip_sgsn_nsei) {
+ if (gbproxy_is_sgsn_nsei(cfg, nsp->nsei)) {
/* look-up or create the BTS context for this BVC */
struct bssgp_bvc_ctx *bctx = btsctx_by_bvci_nsei(nsp->bvci, nsp->nsei);
if (!bctx)
@@ -810,7 +811,7 @@
}
break;
case NS_AFF_CAUSE_FAILURE:
- if (nsp->nsei == cfg->nsip_sgsn_nsei) {
+ if (gbproxy_is_sgsn_nsei(cfg, nsp->nsei)) {
/* sgsn */
/* TODO: BSVC: block all PtP towards bss */
rate_ctr_inc(&cfg->ctrg->
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/21559
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Id41d74ebd41e5084377a986f4a1acd53cae12bc1
Gerrit-Change-Number: 21559
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.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/20201207/1bbdf31d/attachment.htm>