vty: indent to exit, side effect

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/OpenBSC@lists.osmocom.org/.

Neels Hofmeyr nhofmeyr at sysmocom.de
Fri Sep 15 13:15:13 UTC 2017


I implemented https://gerrit.osmocom.org/3880 to use indenting for vty implicit
'exit'.

There's one thing I'm sneaking in there though which I'd like to mention before
I merge:

The patch is storing vty parent node state. This state not only stores previous
indenting, but it also stores the parent's 'node' id and 'priv' data (the
node's object), and puts these back in place after going to a parent.

So far our go_parent_cb()s set these, and AFAIK all of them simply put the
parent's exact node and priv pointer back in place. But technically, a
go_parent_cb() *could* do some magic like going to a completely different node,
or re-creating a new priv pointer. By overwriting from stored state, we will
override such behavior.

I think we want this to happen from stored state in the future, and drop most
of the go_parent_cb(). Does everyone agree?

~N
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20170915/94df355d/attachment.bin>


More information about the OpenBSC mailing list