[PATCH] libosmo-sccp[master]: sccp: again fix handling of default IP addresses in osmo_scc...

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

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Thu Aug 24 14:20:43 UTC 2017


Review at  https://gerrit.osmocom.org/3603

sccp: again fix handling of default IP addresses in osmo_sccp_simple_client()

The previous fix (I312caf9d54cedb02034e4ef88fdd2e6ad9ca1c34) caused the default
addresses to be discarded. Actually talloc_strdup() the default addresses to
use them if not NULL.

Change-Id: Ic8563ab272d5256a1b8ceefd5fee37da61e1bd26
---
M src/sccp_user.c
1 file changed, 2 insertions(+), 4 deletions(-)


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

diff --git a/src/sccp_user.c b/src/sccp_user.c
index b0a807d..06a7174 100644
--- a/src/sccp_user.c
+++ b/src/sccp_user.c
@@ -426,10 +426,8 @@
 			goto out_rt;
 		asp_created = true;
 
-		asp->cfg.local.host =
-		    default_local_ip ? asp->cfg.local.host : NULL;
-		asp->cfg.remote.host =
-		    default_remote_ip ? asp->cfg.remote.host : NULL;
+		asp->cfg.local.host = default_local_ip ? talloc_strdup(asp, default_local_ip) : NULL;
+		asp->cfg.remote.host = default_remote_ip ? talloc_strdup(asp, default_remote_ip) : NULL;
 
 		osmo_ss7_as_add_asp(as, asp->cfg.name);
 	}

-- 
To view, visit https://gerrit.osmocom.org/3603
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic8563ab272d5256a1b8ceefd5fee37da61e1bd26
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>



More information about the gerrit-log mailing list