pespin has submitted this change. (
https://gerrit.osmocom.org/c/libosmocore/+/32534 )
Change subject: gb: ns2: Rename parameter name in gprs_ns2_nsvc_by_sockaddr_bind()
......................................................................
gb: ns2: Rename parameter name in gprs_ns2_nsvc_by_sockaddr_bind()
The old name seems to describe that this function can only be used in
incoming message paths, but it can be used in transmitting context too,
so the param is actually a remote address.
Change-Id: I3f45a4ef339cadd47920ee3b36c38628b38221f6
---
M include/osmocom/gprs/gprs_ns2.h
M src/gb/gprs_ns2_udp.c
2 files changed, 18 insertions(+), 5 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
osmith: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/include/osmocom/gprs/gprs_ns2.h b/include/osmocom/gprs/gprs_ns2.h
index a9c144c..7c7e221 100644
--- a/include/osmocom/gprs/gprs_ns2.h
+++ b/include/osmocom/gprs/gprs_ns2.h
@@ -249,7 +249,7 @@
int gprs_ns2_ip_bind_set_priority(struct gprs_ns2_vc_bind *bind, uint8_t priority);
struct gprs_ns2_vc *gprs_ns2_nsvc_by_sockaddr_bind(
struct gprs_ns2_vc_bind *bind,
- const struct osmo_sockaddr *saddr);
+ const struct osmo_sockaddr *rem_addr);
int gprs_ns2_frgre_bind(struct gprs_ns2_inst *nsi,
const char *name,
diff --git a/src/gb/gprs_ns2_udp.c b/src/gb/gprs_ns2_udp.c
index 4816021..7ecf276 100644
--- a/src/gb/gprs_ns2_udp.c
+++ b/src/gb/gprs_ns2_udp.c
@@ -118,10 +118,10 @@
/*! Find a NS-VC by its remote socket address.
* \param[in] bind in which to search
- * \param[in] saddr remote peer socket adddress to search
+ * \param[in] rem_addr remote peer socket address to search
* \returns NS-VC matching sockaddr; NULL if none found */
struct gprs_ns2_vc *gprs_ns2_nsvc_by_sockaddr_bind(struct gprs_ns2_vc_bind *bind,
- const struct osmo_sockaddr *saddr)
+ const struct osmo_sockaddr *rem_addr)
{
struct gprs_ns2_vc *nsvc;
struct priv_vc *vcpriv;
@@ -130,9 +130,9 @@
llist_for_each_entry(nsvc, &bind->nsvc, blist) {
vcpriv = nsvc->priv;
- if (vcpriv->remote.u.sa.sa_family != saddr->u.sa.sa_family)
+ if (vcpriv->remote.u.sa.sa_family != rem_addr->u.sa.sa_family)
continue;
- if (osmo_sockaddr_cmp(&vcpriv->remote, saddr))
+ if (osmo_sockaddr_cmp(&vcpriv->remote, rem_addr))
continue;
return nsvc;
--
To view, visit
https://gerrit.osmocom.org/c/libosmocore/+/32534
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3f45a4ef339cadd47920ee3b36c38628b38221f6
Gerrit-Change-Number: 32534
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged