summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-08-28 16:26:41 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-08-28 16:27:02 +0200
commitfc3d9a963ef16cf7d3e495a22eab63424eea1a28 (patch)
tree5eeaf86f4665688832f6ca671f1e5e98c13ea21b
parentee8128929755d88ace4e1e566448a14a970b1b40 (diff)
vty: log and return warning if adding ss7 host to set fails
-rw-r--r--src/osmo_ss7_vty.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index 9c31c00..686105e 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -628,7 +628,10 @@ DEFUN(asp_local_ip, asp_local_ip_cmd,
"Local IP Address from which to contact of ASP\n")
{
struct osmo_ss7_asp *asp = vty->index;
- osmo_ss7_asp_peer_add_host(&asp->cfg.local, asp, argv[0]);
+ if (osmo_ss7_asp_peer_add_host(&asp->cfg.local, asp, argv[0]) != 0) {
+ vty_out(vty, "%% Failed adding host '%s' to set%s", argv[0], VTY_NEWLINE);
+ return CMD_WARNING;
+ }
return CMD_SUCCESS;
}
@@ -638,7 +641,10 @@ DEFUN(asp_remote_ip, asp_remote_ip_cmd,
"Remote IP Address of ASP\n")
{
struct osmo_ss7_asp *asp = vty->index;
- osmo_ss7_asp_peer_add_host(&asp->cfg.remote, asp, argv[0]);
+ if (osmo_ss7_asp_peer_add_host(&asp->cfg.remote, asp, argv[0]) != 0) {
+ vty_out(vty, "%% Failed adding host '%s' to set%s", argv[0], VTY_NEWLINE);
+ return CMD_WARNING;
+ }
return CMD_SUCCESS;
}