pespin has uploaded this change for review. ( 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, 17 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/34/32534/1 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..766aa66 100644 --- a/src/gb/gprs_ns2_udp.c +++ b/src/gb/gprs_ns2_udp.c @@ -121,7 +121,7 @@ * \param[in] saddr remote peer socket adddress 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: 1 Gerrit-Owner: pespin <pes...@sysmocom.de> Gerrit-MessageType: newchange