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/.
daniel gerrit-no-reply at lists.osmocom.orgdaniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gbproxy/+/22654 )
Change subject: Require ra_id and cid in gbproxy_cell_alloc
......................................................................
Require ra_id and cid in gbproxy_cell_alloc
Related: SYS#5103
Change-Id: Id57f6b04e558554f2a082821d74b4c733301b059
---
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(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-gbproxy refs/changes/54/22654/1
diff --git a/include/osmocom/sgsn/gb_proxy.h b/include/osmocom/sgsn/gb_proxy.h
index 871ba68..f838354 100644
--- a/include/osmocom/sgsn/gb_proxy.h
+++ b/include/osmocom/sgsn/gb_proxy.h
@@ -222,7 +222,7 @@
LOGPBVC_CAT(BVC, DGPRS, LEVEL, FMT, ## ARGS)
#define LOGPCELL_CAT(CELL, SUBSYS, LEVEL, FMT, ARGS...) \
- LOGP(SUBSYS, LEVEL, "CELL(%05u) " FMT, (CELL)->bvci, ## ARGS)
+ LOGP(SUBSYS, LEVEL, "CELL(%05u/%05u) " FMT, (CELL)->bvci, (CELL)->id.cid, ## ARGS)
#define LOGPCELL(CELL, LEVEL, FMT, ARGS...) \
LOGPCELL_CAT(CELL, DGPRS, LEVEL, FMT, ## ARGS)
@@ -263,7 +263,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 04ebaf6..2dee5b2 100644
--- a/src/gb_proxy.c
+++ b/src/gb_proxy.c
@@ -669,9 +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, ra_id, sizeof(*ra_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 bd11719..311ab78 100644
--- a/src/gb_proxy_peer.c
+++ b/src/gb_proxy_peer.c
@@ -163,7 +163,7 @@
***********************************************************************/
/* 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 +174,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/+/22654
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-gbproxy
Gerrit-Branch: master
Gerrit-Change-Id: Id57f6b04e558554f2a082821d74b4c733301b059
Gerrit-Change-Number: 22654
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210203/566485c5/attachment.htm>