vty: Generalize ournode_exit() and ournode_end()

ournode_exit() duplicates most of bsc_vty_go_parent(). This patch
fixes the inconsistencies of both functions within
bsc_vty_go_parent() and replaces the implementation of
ournode_exit() by a call to it. This makes 'exit' behave exactly
like ^D in all openbsc nodes.

ournode_end() has been changed to walk through the intermediate
nodes until one of the top nodes is reached. This allows for
cleanups to be done on the way.

Note that in config mode if the tree is searched along the nodes
toward the config node and a command is not found this way, a
rollback is done by just replacing the vty's node and index member
variable by the saved old values which might break the whole thing, when
there has been a free() on the way.
1 file changed
tree: 57a4d24360da524887b1b60dab318cffe33b3897
  1. debian/
  2. hlrsync/
  3. linux-kernel/
  4. openbsc/
  5. wireshark/
  6. README