USSD/hlr_vty.c: print error if EUSE is not found

Change-Id: I18045c5e544a99b2414a6f0268f1343df119b9f3
This commit is contained in:
Vadim Yanitskiy 2018-08-02 23:37:51 +07:00
parent a05efe8803
commit b93c44f32e
1 changed files with 7 additions and 1 deletions

View File

@ -193,7 +193,13 @@ DEFUN(cfg_ussd_defaultroute, cfg_ussd_defaultroute_cmd,
USSD_STR "Configure default-route for all USSD to unknown destinations\n"
EXT_STR)
{
struct hlr_euse *euse = euse_find(g_hlr, argv[0]);
struct hlr_euse *euse;
euse = euse_find(g_hlr, argv[0]);
if (!euse) {
vty_out(vty, "%% Cannot find EUSE %s%s", argv[0], VTY_NEWLINE);
return CMD_WARNING;
}
if (g_hlr->euse_default != euse) {
vty_out(vty, "Switching default route from %s to %s%s",