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 submitted this change. ( https://gerrit.osmocom.org/c/osmo-gbproxy/+/22875 ) Change subject: gbproxy: Use bssgp2_nsi_tx_ptp in gbprox_relay2nse ...................................................................... gbproxy: Use bssgp2_nsi_tx_ptp in gbprox_relay2nse Use the function provided by bssgp2 instead of setting up the ns2 prim request ourself. Related: OS#4889 Change-Id: I0b8926eb903ed972edb2ed7ba3edbb3d77889564 --- M src/gb_proxy.c 1 file changed, 3 insertions(+), 10 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/gb_proxy.c b/src/gb_proxy.c index 34e63e3..8b57315 100644 --- a/src/gb_proxy.c +++ b/src/gb_proxy.c @@ -185,17 +185,13 @@ /* create a copy of the message so the old one can * be free()d safely when we return from gbprox_rcvmsg() */ struct gprs_ns2_inst *nsi = nse->cfg->nsi; - struct osmo_gprs_ns2_prim nsp = {}; struct msgb *msg = bssgp_msgb_copy(old_msg, "msgb_relay2nse"); - uint32_t tlli; + uint32_t tlli = 0; int rc; DEBUGP(DGPRS, "NSE(%05u/%s)-BVC(%05u/??) proxying to NSE(%05u/%s)\n", msgb_nsei(msg), !nse->sgsn_facing ? "SGSN" : "BSS", ns_bvci, nse->nsei, nse->sgsn_facing ? "SGSN" : "BSS"); - nsp.bvci = ns_bvci; - nsp.nsei = nse->nsei; - /* Strip the old NS header, it will be replaced with a new one */ strip_ns_hdr(msg); @@ -204,12 +200,9 @@ * all BSSGP UNITDATA PDUs related to an MS shall be passed with * the same LSP, e.g. the LSP contains the MS's TLLI, to the * underlying network service. */ - if (gprs_gb_parse_tlli(msgb_data(msg), msgb_length(msg), &tlli) == 1) - nsp.u.unitdata.link_selector = tlli; + gprs_gb_parse_tlli(msgb_data(msg), msgb_length(msg), &tlli); - osmo_prim_init(&nsp.oph, SAP_NS, GPRS_NS2_PRIM_UNIT_DATA, - PRIM_OP_REQUEST, msg); - rc = gprs_ns2_recv_prim(nsi, &nsp.oph); + rc = bssgp2_nsi_tx_ptp(nsi, nse->nsei, ns_bvci, msg, tlli); /* FIXME: We need a counter group for gbproxy_nse */ //if (rc < 0) // rate_ctr_inc(&bvc->ctrg->ctr[GBPROX_PEER_CTR_TX_ERR]); -- To view, visit https://gerrit.osmocom.org/c/osmo-gbproxy/+/22875 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gbproxy Gerrit-Branch: master Gerrit-Change-Id: I0b8926eb903ed972edb2ed7ba3edbb3d77889564 Gerrit-Change-Number: 22875 Gerrit-PatchSet: 2 Gerrit-Owner: daniel <dwillmann at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann at sysmocom.de> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210212/ed4de0ac/attachment.htm>