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/+/21418 ) Change subject: gbproxy: Separate function to move gbproxy_peer to different nse ...................................................................... gbproxy: Separate function to move gbproxy_peer to different nse Change-Id: I0a8b1e4b78384ea99d50109f050ca501b18ba5d9 Related: SYS#5226 --- M include/osmocom/sgsn/gb_proxy.h M src/gbproxy/gb_proxy.c M src/gbproxy/gb_proxy_peer.c 3 files changed, 9 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified pespin: 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 54d4548..9f91bd6 100644 --- a/include/osmocom/sgsn/gb_proxy.h +++ b/include/osmocom/sgsn/gb_proxy.h @@ -344,6 +344,7 @@ struct gbproxy_config *cfg, struct tlv_parsed *tp); struct gbproxy_peer *gbproxy_peer_alloc(struct gbproxy_nse *nse, uint16_t bvci); void gbproxy_peer_free(struct gbproxy_peer *peer); +void gbproxy_peer_move(struct gbproxy_peer *peer, struct gbproxy_nse *nse); int gbproxy_cleanup_peers(struct gbproxy_config *cfg, uint16_t nsei, uint16_t bvci); /* NSE handling */ diff --git a/src/gbproxy/gb_proxy.c b/src/gbproxy/gb_proxy.c index db7f55b..bd58617 100644 --- a/src/gbproxy/gb_proxy.c +++ b/src/gbproxy/gb_proxy.c @@ -1114,9 +1114,7 @@ LOGP(DGPRS, LOGL_NOTICE, "Peer for BVCI=%u moved from NSEI=%u to NSEI=%u\n", bvci, nse_old->nsei, nsei); /* Move peer to different NSE */ - llist_del(&from_peer->list); - llist_add(&from_peer->list, &nse_new->bts_peers); - from_peer->nse = nse_new; + gbproxy_peer_move(from_peer, nse_new); } if (TLVP_PRESENT(&tp, BSSGP_IE_CELL_ID)) { diff --git a/src/gbproxy/gb_proxy_peer.c b/src/gbproxy/gb_proxy_peer.c index 920547c..62c4d94 100644 --- a/src/gbproxy/gb_proxy_peer.c +++ b/src/gbproxy/gb_proxy_peer.c @@ -253,6 +253,13 @@ talloc_free(peer); } +void gbproxy_peer_move(struct gbproxy_peer *peer, struct gbproxy_nse *nse) +{ + llist_del(&peer->list); + llist_add(&peer->list, &nse->bts_peers); + peer->nse = nse; +} + int gbproxy_cleanup_peers(struct gbproxy_config *cfg, uint16_t nsei, uint16_t bvci) { int counter = 0; -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/21418 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I0a8b1e4b78384ea99d50109f050ca501b18ba5d9 Gerrit-Change-Number: 21418 Gerrit-PatchSet: 2 Gerrit-Owner: daniel <dwillmann at sysmocom.de> 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/20201130/489e77b9/attachment.htm>