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 uploaded this change for review. ( 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 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, 7 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gbproxy refs/changes/71/22671/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 ac1c981..2b19c8b 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: 1 Gerrit-Owner: dexter <pmaier at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210203/a7e5a7a4/attachment.htm>