Change in libosmo-sccp[master]: ss7: Set correct local addr and port during dynamic ASP creation

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/.

pespin gerrit-no-reply at lists.osmocom.org
Fri Nov 8 14:57:40 UTC 2019


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16013 )


Change subject: ss7: Set correct local addr and port during dynamic ASP creation
......................................................................

ss7: Set correct local addr and port during dynamic ASP creation

Change-Id: I54aada351d5fb74f5015fdfe691d0b237354743c
---
M src/osmo_ss7.c
1 file changed, 5 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/13/16013/1

diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index 4d5c349..0d49d1a 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -1718,6 +1718,7 @@
 	struct osmo_xua_server *oxs = osmo_stream_srv_link_get_data(link);
 	struct osmo_stream_srv *srv;
 	struct osmo_ss7_asp *asp;
+	int i;
 	char *sock_name = osmo_sock_get_name(link, fd);
 	const char *proto_name = get_value_string(osmo_ss7_asp_protocol_vals, oxs->cfg.proto);
 
@@ -1764,8 +1765,10 @@
 					sock_name, asp->cfg.name);
 				asp->cfg.is_server = true;
 				asp->cfg.role = OSMO_SS7_ASP_ROLE_SG;
-				asp->cfg.local.host[0] = NULL;
-				asp->cfg.local.host_cnt = 1;
+				asp->cfg.local.port = oxs->cfg.local.port;
+				for (i = 0; i < oxs->cfg.local.host_cnt; i++)
+					asp->cfg.local.host[i] = talloc_strdup(asp, oxs->cfg.local.host[i]);
+				asp->cfg.local.host_cnt = oxs->cfg.local.host_cnt;
 				asp->cfg.remote.port = atoi(portbuf);
 				asp->cfg.remote.host[0] = talloc_strdup(asp, hostbuf);
 				asp->cfg.remote.host_cnt = 1;

-- 
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16013
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I54aada351d5fb74f5015fdfe691d0b237354743c
Gerrit-Change-Number: 16013
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191108/78cfa72c/attachment.htm>


More information about the gerrit-log mailing list