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

Related: OS#4472, OS#4890
Depends: libosmocore.git I8f1d66b7b3b12da12db8b5e6bd08c1beff085b3e
Change-Id: I3638c7204db576116ba2e20dae27539ce6143bd7
This commit is contained in:
Alexander Couzens 2020-12-06 01:24:02 +01:00 committed by Harald Welte
parent 5012e07685
commit b644fd1f09
1 changed files with 3 additions and 1 deletions

View File

@ -957,6 +957,7 @@ static int ns_create_nsvc(struct gprs_rlcmac_bts *bts,
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 @@ static int ns_create_nsvc(struct gprs_rlcmac_bts *bts,
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;