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/.
lynxis lazus gerrit-no-reply at lists.osmocom.orglynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/20553 )
Change subject: gprs_ns2: gprs_ns2_ip_bind() check if the bind already exists
......................................................................
gprs_ns2: gprs_ns2_ip_bind() check if the bind already exists
To prevent adding the same bind twice. It also returns
the bind in **result.
Change-Id: Ib816f14c387cc6ff86f9c0057daded1d72cee0f5
---
M src/gb/gprs_ns2_udp.c
1 file changed, 8 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/53/20553/1
diff --git a/src/gb/gprs_ns2_udp.c b/src/gb/gprs_ns2_udp.c
index a578160..7ead71a 100644
--- a/src/gb/gprs_ns2_udp.c
+++ b/src/gb/gprs_ns2_udp.c
@@ -302,10 +302,17 @@
int dscp,
struct gprs_ns2_vc_bind **result)
{
- struct gprs_ns2_vc_bind *bind = talloc_zero(nsi, struct gprs_ns2_vc_bind);
+ struct gprs_ns2_vc_bind *bind;
struct priv_bind *priv;
int rc;
+ bind = gprs_ns2_ip_bind_by_sockaddr(nsi, local);
+ if (bind) {
+ *result = bind;
+ return -EBUSY;
+ }
+
+ bind = talloc_zero(nsi, struct gprs_ns2_vc_bind);
if (!bind)
return -ENOSPC;
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/20553
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib816f14c387cc6ff86f9c0057daded1d72cee0f5
Gerrit-Change-Number: 20553
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201012/3aca2241/attachment.htm>