Change in libosmocore[master]: vty: Fix go_parent_cb not called for indented nodes at end of cfg file

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 Oct 11 12:13:20 UTC 2019


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/15777 )


Change subject: vty: Fix go_parent_cb not called for indented nodes at end of cfg file
......................................................................

vty: Fix go_parent_cb not called for indented nodes at end of cfg file

Without this patch, for instance in this cfg file below, go_parent_cb is
not called for nodes such as "listen" and "cs7":
"""
line vty
 no login
cs7 instance 0
 xua rkm routing-key-allocation dynamic-permitted
 listen m3ua 2905
  accept-asp-connections dynamic-permitted
  local-ip 127.0.0.1
"""

Related: OS#3608
Change-Id: Ia6d88c0e63d94ba99e950da6efbc4c1871070012
---
M src/vty/command.c
1 file changed, 4 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/77/15777/1

diff --git a/src/vty/command.c b/src/vty/command.c
index 0d24b66..a36f30a 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -2662,6 +2662,10 @@
 			indent = NULL;
 		}
 	}
+	/* Make sure we call go_parent_cb for all remaining indent levels at the end of file */
+	while (vty_parent(vty))
+		vty_go_parent(vty);
+
 	return CMD_SUCCESS;
 
 return_invalid_indent:

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ia6d88c0e63d94ba99e950da6efbc4c1871070012
Gerrit-Change-Number: 15777
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/20191011/7394eada/attachment.htm>


More information about the gerrit-log mailing list