falconia has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/38818?usp=email )
Change subject: vty: always emit reject-cause lines in saved config ......................................................................
vty: always emit reject-cause lines in saved config
When reject-cause (not-found|no-proxy) setting was added, it was implemented such that the new setting is not written into saved config files if it equals the default of 'imsi-unknown'. Change this behavior to always write out the current setting for each of not-found and no-proxy, whether or not they match compiled-in defaults.
Change-Id: I18708fc1c08a85e98582c97ec59dd3822a0767fb --- M src/hlr_vty.c M tests/test_nodes.vty 2 files changed, 8 insertions(+), 8 deletions(-)
Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved
diff --git a/src/hlr_vty.c b/src/hlr_vty.c index 2c7cd5b..4694c44 100644 --- a/src/hlr_vty.c +++ b/src/hlr_vty.c @@ -320,14 +320,12 @@ { vty_out(vty, "hlr%s", VTY_NEWLINE);
- if (g_hlr->reject_cause != GMM_CAUSE_IMSI_UNKNOWN) - vty_out(vty, " reject-cause not-found %s%s", - get_value_string_or_null(gsm48_gmm_cause_vty_names, - (uint32_t) g_hlr->reject_cause), VTY_NEWLINE); - if (g_hlr->no_proxy_reject_cause != GMM_CAUSE_IMSI_UNKNOWN) - vty_out(vty, " reject-cause no-proxy %s%s", - get_value_string_or_null(gsm48_gmm_cause_vty_names, - (uint32_t) g_hlr->no_proxy_reject_cause), VTY_NEWLINE); + vty_out(vty, " reject-cause not-found %s%s", + get_value_string_or_null(gsm48_gmm_cause_vty_names, + (uint32_t) g_hlr->reject_cause), VTY_NEWLINE); + vty_out(vty, " reject-cause no-proxy %s%s", + get_value_string_or_null(gsm48_gmm_cause_vty_names, + (uint32_t) g_hlr->no_proxy_reject_cause), VTY_NEWLINE); if (g_hlr->store_imei) vty_out(vty, " store-imei%s", VTY_NEWLINE); if (g_hlr->db_file_path && strcmp(g_hlr->db_file_path, HLR_DEFAULT_DB_FILE_PATH)) diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty index 6875416..516360f 100644 --- a/tests/test_nodes.vty +++ b/tests/test_nodes.vty @@ -113,6 +113,8 @@ logging level dgsm notice ... hlr + reject-cause not-found imsi-unknown + reject-cause no-proxy imsi-unknown store-imei database hlr_vty_test.db no subscriber-create-on-demand