mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
vty: fix unreachable code (error msg on trunk alloc fail)
When a trunk is selected that does not exist, a new one is created. In this case the VTY would print an error message but the function exits early. The code that would print the error is unreachable. Change-Id: Ie8c3b083174eb8209df2c06f65db6d7bbfaa87f7 fixes: CID#210637
This commit is contained in:
@@ -813,14 +813,11 @@ ALIAS_DEPRECATED(cfg_mgcp_agent_addr, cfg_mgcp_agent_addr_cmd_old,
|
||||
trunk = mgcp_trunk_num(g_cfg, index);
|
||||
if (!trunk) {
|
||||
trunk = mgcp_trunk_alloc(g_cfg, MGCP_TRUNK_E1, index);
|
||||
if (!trunk)
|
||||
if (!trunk) {
|
||||
vty_out(vty, "%%Unable to allocate trunk %u.%s",
|
||||
index, VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
}
|
||||
|
||||
if (!trunk) {
|
||||
vty_out(vty, "%%Unable to allocate trunk %u.%s",
|
||||
index, VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
}
|
||||
}
|
||||
|
||||
vty->node = TRUNK_NODE;
|
||||
|
Reference in New Issue
Block a user