On Wed, 15 Jun 2016, Donald Sharp wrote:
I've spent a bit of time trying to understand this problem and haven't gotten anywhere.I don't remember why I put in: @@ -622,6 +622,8 @@ install_element (enum node_type ntype, struct cmd_element *cmd) vector_set (cnode->cmd_vector, cmd); if (cmd->tokens == NULL) cmd->tokens = cmd_parse_format(cmd->string, cmd->doc); + else + assert(0); if (ntype == VIEW_NODE) install_element (ENABLE_NODE, cmd); anymore and I've backed this bit of code out and now I have all commands as ambiguous when I test. I'll see what I can find this evening again
Was looking myself. cmd->tokens is just the parser doing some caching of work on the command string I think, but it'll be set on the second install.
You could do a loop over the vector to see if the cmd pointer already exists, e.g. add a 'vector_lookup_value', but seems a bit inefficient for nodes with many commands.
Otherwise cmd->cmd_vector'd have to changed to a hash, but that requires surgery across the parser.
regards, -- Paul Jakma | [email protected] | @pjakma | Key ID: 0xD86BF79464A2FF6A Fortune: Reality is just a convenient measure of complexity. -- Alvy Ray Smith _______________________________________________ Quagga-dev mailing list [email protected] https://lists.quagga.net/mailman/listinfo/quagga-dev
