Change in osmo-pcu[master]: ns2: follow changes to add a unique name to all binds

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.org
Wed Dec 16 12:00:40 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/21729 )

Change subject: ns2: follow changes to add a unique name to all binds
......................................................................

ns2: follow changes to add a unique name to all binds

Related: OS#4472, OS#4890
Depends: libosmocore.git I8f1d66b7b3b12da12db8b5e6bd08c1beff085b3e
Change-Id: I3638c7204db576116ba2e20dae27539ce6143bd7
---
M src/gprs_bssgp_pcu.cpp
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  laforge: Looks good to me, approved; Verified



diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp
index 4d24d2e..b29413d 100644
--- a/src/gprs_bssgp_pcu.cpp
+++ b/src/gprs_bssgp_pcu.cpp
@@ -957,6 +957,7 @@
 	bool nsvcs = false;
 	struct gprs_ns2_vc *nsvc;
 	struct gprs_ns2_vc_bind *bind[PCU_IF_NUM_NSVC] = { };
+	char name[5];
 
 	if (!valid)
 		return -1;
@@ -966,7 +967,8 @@
 			continue;
 
 		if (!gprs_ns2_ip_bind_by_sockaddr(bts->nsi, &local[i])) {
-			rc = gprs_ns2_ip_bind(bts->nsi, &local[i], 0, &bind[i]);
+			snprintf(name, sizeof(name), "pcu%d", i);
+			rc = gprs_ns2_ip_bind(bts->nsi, name, &local[i], 0, &bind[i]);
 			if (rc < 0) {
 				LOGP(DBSSGP, LOGL_ERROR, "Failed to bind to %s\n", osmo_sockaddr_to_str(&local[i]));
 				continue;

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/21729
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I3638c7204db576116ba2e20dae27539ce6143bd7
Gerrit-Change-Number: 21729
Gerrit-PatchSet: 4
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
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/20201216/806a3c16/attachment.htm>


More information about the gerrit-log mailing list