diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-03-01 21:32:01 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-03-01 21:33:35 +0100 |
commit | 880a34d2ef63276fdbba34cc4944d66d72467e6a (patch) | |
tree | 5ad8e1f02813efe5f07c5f4e549d634b48a07d4b | |
parent | 7ee6e554afa1a9847c38638cffe99e5d019b7d1b (diff) |
vty: Don't print error if removing auth data while none present
It's a bit confusing to the user if he wants to set AUD=none
and it's already none. Avoid printing error messages in that case.
Change-Id: I5f32dd5d6e4939c738faf442c7e86671d18777f8
-rw-r--r-- | src/hlr_vty_subscr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hlr_vty_subscr.c b/src/hlr_vty_subscr.c index 5a300a7..7191a1c 100644 --- a/src/hlr_vty_subscr.c +++ b/src/hlr_vty_subscr.c @@ -334,7 +334,7 @@ DEFUN(subscriber_no_aud2g, rc = db_subscr_update_aud_by_id(g_hlr->dbc, subscr.id, &aud); - if (rc) { + if (rc && rc != -ENOENT) { vty_out(vty, "%% Error: cannot disable 2G auth data for IMSI='%s'%s", subscr.imsi, VTY_NEWLINE); return CMD_WARNING; @@ -405,7 +405,7 @@ DEFUN(subscriber_no_aud3g, rc = db_subscr_update_aud_by_id(g_hlr->dbc, subscr.id, &aud); - if (rc) { + if (rc && rc != -ENOENT) { vty_out(vty, "%% Error: cannot disable 3G auth data for IMSI='%s'%s", subscr.imsi, VTY_NEWLINE); return CMD_WARNING; |