Vty: Fixup config shown/written from vty
This commit fixes the following errors: Missing timeout param for mslookup. Fails to start reading a written config if an msc node is configured in the mslookup server. Places the individual msc node services in the top-level wildcard node due to incorrect indentation. * Add missing timeout param. * Add missing "ipa-name" part to mslookup-server-msc section. * Add one extra space indentation for msc services. This commit also adds a DEFINE for the default timeout value. Change-Id: Ibb60e74a0803f05f37ac13ca529d77b4cb736025changes/99/30699/5
parent
f80ab768d0
commit
c27bc90ae6
|
@ -25,6 +25,7 @@
|
|||
#include <osmocom/gsupclient/cni_peer_id.h>
|
||||
#include <osmocom/gsupclient/gsup_req.h>
|
||||
|
||||
#define OSMO_DGSM_DEFAULT_RESULT_TIMEOUT_MS 2000
|
||||
#define LOG_DGSM(imsi, level, fmt, args...) \
|
||||
LOGP(DDGSM, level, "(IMSI-%s) " fmt, imsi, ##args)
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ void dgsm_init(void *ctx)
|
|||
|
||||
g_hlr->mslookup.server.local_attach_max_age = 60 * 60;
|
||||
|
||||
g_hlr->mslookup.client.result_timeout_milliseconds = 2000;
|
||||
g_hlr->mslookup.client.result_timeout_milliseconds = OSMO_DGSM_DEFAULT_RESULT_TIMEOUT_MS;
|
||||
|
||||
g_hlr->gsup_unit_name.unit_name = "HLR";
|
||||
g_hlr->gsup_unit_name.serno = "unnamed-HLR";
|
||||
|
|
|
@ -447,8 +447,8 @@ int config_write_mslookup(struct vty *vty)
|
|||
llist_for_each_entry(msc, &g_hlr->mslookup.server.local_site_services, entry) {
|
||||
if (!osmo_ipa_name_cmp(&mslookup_server_msc_wildcard, &msc->name))
|
||||
continue;
|
||||
vty_out(vty, " msc %s%s", osmo_ipa_name_to_str(&msc->name), VTY_NEWLINE);
|
||||
config_write_msc_services(vty, " ", msc);
|
||||
vty_out(vty, " msc ipa-name %s%s", osmo_ipa_name_to_str(&msc->name), VTY_NEWLINE);
|
||||
config_write_msc_services(vty, " ", msc);
|
||||
}
|
||||
|
||||
/* If the server is disabled, still output the above to not lose the service config. */
|
||||
|
@ -475,6 +475,10 @@ int config_write_mslookup(struct vty *vty)
|
|||
vty_out(vty, " mdns domain-suffix %s%s",
|
||||
g_hlr->mslookup.client.mdns.domain_suffix,
|
||||
VTY_NEWLINE);
|
||||
if (g_hlr->mslookup.client.result_timeout_milliseconds != OSMO_DGSM_DEFAULT_RESULT_TIMEOUT_MS)
|
||||
vty_out(vty, " timeout %u%s",
|
||||
g_hlr->mslookup.client.result_timeout_milliseconds,
|
||||
VTY_NEWLINE);
|
||||
}
|
||||
|
||||
return CMD_SUCCESS;
|
||||
|
|
|
@ -349,15 +349,15 @@ mslookup
|
|||
service foo.bar at 123.45.67.89 1011
|
||||
service baz.bar at 121.31.41.5 1617
|
||||
service baz.bar at a:b:c::d 1819
|
||||
msc MSC-1
|
||||
msc msc-901-70-23
|
||||
service foo.bar at 76.54.32.10 1234
|
||||
service baz.bar at 12.11.10.98 7654
|
||||
service baz.bar at dd:cc:bb::a 3210
|
||||
msc msc-901-70-42
|
||||
service foo.bar at 1.1.1.1 1111
|
||||
service baz.bar at 2.2.2.2 2222
|
||||
service baz.bar at 2222:2222:2222::2 2222
|
||||
msc ipa-name MSC-1
|
||||
msc ipa-name msc-901-70-23
|
||||
service foo.bar at 76.54.32.10 1234
|
||||
service baz.bar at 12.11.10.98 7654
|
||||
service baz.bar at dd:cc:bb::a 3210
|
||||
msc ipa-name msc-901-70-42
|
||||
service foo.bar at 1.1.1.1 1111
|
||||
service baz.bar at 2.2.2.2 2222
|
||||
service baz.bar at 2222:2222:2222::2 2222
|
||||
client
|
||||
gateway-proxy 1.2.3.4 4222
|
||||
mdns bind 239.192.23.42 4266
|
||||
|
@ -404,12 +404,12 @@ mslookup
|
|||
mdns bind 239.192.23.42 4266
|
||||
service foo.bar at 123.45.67.89 1011
|
||||
service baz.bar at 121.31.41.5 1617
|
||||
msc MSC-1
|
||||
msc msc-901-70-23
|
||||
service foo.bar at 76.54.32.10 1234
|
||||
service baz.bar at 12.11.10.98 7654
|
||||
msc msc-901-70-42
|
||||
service foo.bar at 1.1.1.1 1111
|
||||
msc ipa-name MSC-1
|
||||
msc ipa-name msc-901-70-23
|
||||
service foo.bar at 76.54.32.10 1234
|
||||
service baz.bar at 12.11.10.98 7654
|
||||
msc ipa-name msc-901-70-42
|
||||
service foo.bar at 1.1.1.1 1111
|
||||
client
|
||||
mdns bind 239.192.23.42 4266
|
||||
...
|
||||
|
@ -437,12 +437,12 @@ mslookup
|
|||
service foo.bar at 123.45.67.89 1011
|
||||
service baz.bar at 121.31.41.5 1617
|
||||
service gsup.hlr at 23.42.17.11 4223
|
||||
msc MSC-1
|
||||
msc msc-901-70-23
|
||||
service foo.bar at 76.54.32.10 1234
|
||||
service baz.bar at 12.11.10.98 7654
|
||||
msc msc-901-70-42
|
||||
service foo.bar at 1.1.1.1 1111
|
||||
msc ipa-name MSC-1
|
||||
msc ipa-name msc-901-70-23
|
||||
service foo.bar at 76.54.32.10 1234
|
||||
service baz.bar at 12.11.10.98 7654
|
||||
msc ipa-name msc-901-70-42
|
||||
service foo.bar at 1.1.1.1 1111
|
||||
client
|
||||
mdns bind 239.192.23.42 4266
|
||||
...
|
||||
|
|
Loading…
Reference in New Issue