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/.
dexter gerrit-no-reply at lists.osmocom.orgdexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gbproxy/+/22671 )
Change subject: gb_proxy_peer: Require ra_id and cid in gbproxy_cell_alloc
......................................................................
gb_proxy_peer: Require ra_id and cid in gbproxy_cell_alloc
pass raid and cell id directly as parameter to gbproxy_cell_alloc so
that we do not need to fill tas parameter to gbproxy_cell_alloc so that
we do not need to fill the struct members later.
Change-Id: Ic7deae5ccf839b941d70557d28451d52f32cebbb
Related: SYS#5103
---
M include/osmocom/sgsn/gb_proxy.h
M src/gb_proxy.c
M src/gb_proxy_peer.c
3 files changed, 6 insertions(+), 5 deletions(-)
Approvals:
Jenkins Builder: Verified
daniel: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/include/osmocom/sgsn/gb_proxy.h b/include/osmocom/sgsn/gb_proxy.h
index 96b2bcc..a36f305 100644
--- a/include/osmocom/sgsn/gb_proxy.h
+++ b/include/osmocom/sgsn/gb_proxy.h
@@ -268,7 +268,7 @@
void gbproxy_bvc_free(struct gbproxy_bvc *bvc);
int gbproxy_cleanup_bvcs(struct gbproxy_nse *nse, uint16_t bvci);
-struct gbproxy_cell *gbproxy_cell_alloc(struct gbproxy_config *cfg, uint16_t bvci);
+struct gbproxy_cell *gbproxy_cell_alloc(struct gbproxy_config *cfg, uint16_t bvci, const struct gprs_ra_id *raid, uint16_t cid);
struct gbproxy_cell *gbproxy_cell_by_bvci(struct gbproxy_config *cfg, uint16_t bvci);
struct gbproxy_cell *gbproxy_cell_by_cellid(struct gbproxy_config *cfg, const struct gprs_ra_id *raid, uint16_t cid);
void gbproxy_cell_free(struct gbproxy_cell *cell);
diff --git a/src/gb_proxy.c b/src/gb_proxy.c
index 12e685d..116530f 100644
--- a/src/gb_proxy.c
+++ b/src/gb_proxy.c
@@ -669,10 +669,8 @@
* for this BVC. We need to create the 'cell' data structure and the SGSN-side
* BVC counterparts */
- bvc->cell = gbproxy_cell_alloc(cfg, bvci);
+ bvc->cell = gbproxy_cell_alloc(cfg, bvci, ra_id, cell_id);
OSMO_ASSERT(bvc->cell);
- memcpy(&bvc->cell->id.raid, &bvc->raid, sizeof(bvc->cell->id.raid));
- bvc->cell->id.cid = cell_id;
/* link us to the cell and vice-versa */
bvc->cell->bss_bvc = bvc;
diff --git a/src/gb_proxy_peer.c b/src/gb_proxy_peer.c
index 753355e..9ea00a9 100644
--- a/src/gb_proxy_peer.c
+++ b/src/gb_proxy_peer.c
@@ -163,7 +163,8 @@
***********************************************************************/
/* Allocate a new 'cell' object */
-struct gbproxy_cell *gbproxy_cell_alloc(struct gbproxy_config *cfg, uint16_t bvci)
+struct gbproxy_cell *gbproxy_cell_alloc(struct gbproxy_config *cfg, uint16_t bvci,
+ const struct gprs_ra_id *raid, uint16_t cid)
{
struct gbproxy_cell *cell;
OSMO_ASSERT(cfg);
@@ -174,6 +175,8 @@
cell->cfg = cfg;
cell->bvci = bvci;
+ cell->id.cid = cid;
+ memcpy(&cell->id.raid, raid, sizeof(cell->id.raid));
hash_add(cfg->cells, &cell->list, cell->bvci);
--
To view, visit https://gerrit.osmocom.org/c/osmo-gbproxy/+/22671
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-gbproxy
Gerrit-Branch: master
Gerrit-Change-Id: Ic7deae5ccf839b941d70557d28451d52f32cebbb
Gerrit-Change-Number: 22671
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210210/1324ff56/attachment.htm>