pespin has uploaded this change for review.

View Change

vty: Fix wrong return check in routing-key command

The function ss7_as_routing_key_create_route() returns a route pointer,
not a return code.

Related: Coverity CID#565013
Change-Id: I39a8f11a9c39819c8bf180a69cc7cb26b0fb21f4
---
M src/ss7_as_vty.c
1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/50/43950/1
diff --git a/src/ss7_as_vty.c b/src/ss7_as_vty.c
index 6197093..ff533bb 100644
--- a/src/ss7_as_vty.c
+++ b/src/ss7_as_vty.c
@@ -461,7 +461,7 @@
rkey->ssn = ssn;

/* Add fully qualified route for routing-key: */
- if (ss7_as_routing_key_create_route(as) < 0) {
+ if (!ss7_as_routing_key_create_route(as)) {
vty_out(vty, "Failed adding dynamic match-routing-key route for AS %s!%s",
as->cfg.name, VTY_NEWLINE);
return CMD_WARNING;

To view, visit change 43950. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I39a8f11a9c39819c8bf180a69cc7cb26b0fb21f4
Gerrit-Change-Number: 43950
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>