aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2022-01-26 10:57:32 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2022-01-26 15:33:55 +0100
commit5cfda55c70865455433e14716acf7e86b7f8375b (patch)
treeccfe68e0c2125a577e7fc84a541d9f559eab7953
parent043275129c5b737b32bc3645242b644acad72795 (diff)
sccp_user: do not force the role ASP when configured differently2021q4
The current implementation of osmo_sccp_simple_client forces the ASP to run in ASP role. Even then when the user has configured it differently via VTY. The osmo_sccp_simple_client should respect the VTY configuration. Change-Id: Ib57c513407747d36e503a4fb01c50c69dea0cb85 Related: SYS#5796
-rw-r--r--src/sccp_user.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sccp_user.c b/src/sccp_user.c
index ade9487..839ef64 100644
--- a/src/sccp_user.c
+++ b/src/sccp_user.c
@@ -633,7 +633,11 @@ osmo_sccp_simple_client_on_ss7_id(void *ctx, uint32_t ss7_id, const char *name,
/* Ensure that the ASP we use is set to client mode. */
asp->cfg.is_server = false;
- asp->cfg.role = OSMO_SS7_ASP_ROLE_ASP;
+
+ /* Make sure that the role of this ASP is set to ASP unless the user
+ * made a concious decision about the role via the VTY */
+ if (!asp->cfg.role_set_by_vty)
+ asp->cfg.role = OSMO_SS7_ASP_ROLE_ASP;
/* Restart ASP */
if (prot != OSMO_SS7_ASP_PROT_IPA)