aboutsummaryrefslogtreecommitdiffstats
path: root/src/sccp_user.c
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-08-11 11:30:26 +0200
committerHarald Welte <laforge@gnumonks.org>2017-08-24 19:07:27 +0000
commit4d8cccc6509cee79fdf12b48ebcf6238fd59c3b0 (patch)
tree21621c581bc91f3f9d726c868e46007c86492720 /src/sccp_user.c
parent56384469e99fd46be02be178e9ad2ffbfb1f32e2 (diff)
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
Diffstat (limited to 'src/sccp_user.c')
-rw-r--r--src/sccp_user.c6
1 files changed, 2 insertions, 4 deletions
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 @@ osmo_sccp_simple_client_on_ss7_id(void *ctx, uint32_t ss7_id, const char *name,
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);
}