[XS] Change in libosmocore[master]: vty: assert in optional param followed by optional-multi-choice param...
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/41704?usp=email ) Change subject: vty: assert in optional param followed by optional-multi-choice param: Fix [2/2] ...................................................................... vty: assert in optional param followed by optional-multi-choice param: Fix [2/2] in cmd_make_descr, cp during the asserting iteration looks like this: (gdb) print cp $18 = 0x555555c1939d ") [(one|two|three)" As a result, first multiple is set to 0 and later on logic was missing for this specific case. Change-Id: I4c184db53bec28ab42bcd45e033733d850eea5d2 Fixes: b55f4d2df21b966c3953264d8961f259814f4650 Related: OS#6360 --- M src/vty/command.c 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/vty/command.c b/src/vty/command.c index 8594290..c1bda8a 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -443,6 +443,12 @@ while (isspace((int)*cp) && *cp != '\0') cp++; + /* Explicitly detect optional multi-choice braces like [(one|two)]. */ + if (cp[0] == '[' && cp[1] == '(') { + optional_brace = 1; + cp++; + } + if (*cp == '(') { multiple = 1; cp++; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41704?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I4c184db53bec28ab42bcd45e033733d850eea5d2 Gerrit-Change-Number: 41704 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: falconia <falcon@freecalypso.org> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> Gerrit-Reviewer: osmith <osmith@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de>
participants (1)
-
pespin