From 3424c5ed99b05b0fcee25e4637c2ff3a0c3bf35e Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 24 Feb 2022 19:46:10 +0100 Subject: [PATCH] sccp_demo_user: make sure the command-line specified point codes are used Change-Id: I983066199e5d8f056895fdad370e3b4439b4dba4 --- examples/internal.h | 3 +++ examples/sccp_demo_user.c | 2 ++ examples/sccp_test_vty.c | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/internal.h b/examples/internal.h index ef560edd..5dd439c5 100644 --- a/examples/internal.h +++ b/examples/internal.h @@ -12,6 +12,9 @@ enum { struct osmo_sccp_user; +extern struct osmo_sccp_addr g_calling_addr; +extern struct osmo_sccp_addr g_called_addr; + int sccp_test_user_vty_install(struct osmo_sccp_instance *inst, int ssn); int sccp_test_server_init(struct osmo_sccp_instance *sccp); diff --git a/examples/sccp_demo_user.c b/examples/sccp_demo_user.c index 5f443e25..bcb95f44 100644 --- a/examples/sccp_demo_user.c +++ b/examples/sccp_demo_user.c @@ -300,6 +300,8 @@ int main(int argc, char **argv) } sccp_test_server_init(g_sccp); } + g_calling_addr.pc = local_pc; + g_called_addr.pc = remote_pc; while (1) { osmo_select_main(0); diff --git a/examples/sccp_test_vty.c b/examples/sccp_test_vty.c index c477c8b5..044ecf21 100644 --- a/examples/sccp_test_vty.c +++ b/examples/sccp_test_vty.c @@ -13,13 +13,13 @@ static struct osmo_sccp_user *g_scu; -static struct osmo_sccp_addr g_calling_addr = { +struct osmo_sccp_addr g_calling_addr = { .presence = OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC, .ri = OSMO_SCCP_RI_SSN_PC, .pc = 23, }; -static struct osmo_sccp_addr g_called_addr = { +struct osmo_sccp_addr g_called_addr = { .presence = OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC, .ssn = 1, .ri = OSMO_SCCP_RI_SSN_PC,