Change in libosmo-sccp[master]: vty: log and return warning if adding ss7 host to set fails

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Fri Aug 28 15:14:36 UTC 2020


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/19878 )


Change subject: vty: log and return warning if adding ss7 host to set fails
......................................................................

vty: log and return warning if adding ss7 host to set fails

Change-Id: Ib86ef3c3db6096a1e38690b9e598a58387e6b38e
---
M src/osmo_ss7_vty.c
1 file changed, 8 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/78/19878/1

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 @@
 	"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 @@
 	"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;
 }
 

-- 
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/19878
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Ib86ef3c3db6096a1e38690b9e598a58387e6b38e
Gerrit-Change-Number: 19878
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200828/8f3ad009/attachment.htm>


More information about the gerrit-log mailing list