[Xorp-hackers] fix for bug 621
Pavlin Radoslavov
pavlin at icir.org
Tue May 23 23:18:59 PDT 2006
> Here's a fix for this bug--it fixes the problem downstream, but
> this should probably be fixed "upstream" if possible. Diff below
Thanks!
Fix applied to CVS:
1.56 +7 -6; commitid: 5e714473f9cd7ea6; xorp/cli/cli_client.cc
BTW, your patch seems the right place to fix the problem, so I
didn't understand your comment regarding fixing it "upstream".
Pavlin
>
> Mike Larson
> Vyatta
>
>
> --- cli_client.cc_old 2006-05-22 18:14:43.000000000 +0000
> +++ cli_client.cc_new 2006-05-22 18:14:50.000000000 +0000
> @@ -1692,6 +1692,7 @@
> CliCommand *tmp_cli_command = *iter;
> if (! tmp_cli_command->has_cli_completion_func())
> continue;
> +
> if (tmp_cli_command->_cli_completion_func(tmp_cli_command,
> cpl, NULL, line, word_end,
> cli_command_match_list)) {
> @@ -1708,21 +1709,27 @@
> ret_value = 0;
> }
> }
> -
> +
> //
> // Separate the type-match commands from the rest
> //
> + set<string> no_type_coll;
> for (iter = cli_command_match_list.begin();
> iter != cli_command_match_list.end();
> ++iter) {
> CliCommand *tmp_cli_command = *iter;
> +
> if (tmp_cli_command->has_type_match_cb())
> type_list.push_back(tmp_cli_command);
> - else
> - no_type_list.push_back(tmp_cli_command);
> + else {
> + no_type_coll.insert(tmp_cli_command->_name);
> + }
> }
>
> - if (no_type_list.size() > 1) {
> +
> +
> +
> + if (no_type_coll.size() > 1) {
> // Prepare and print the initial message(s)
> string token_line = string(line, word_end);
> string token;
>
> _______________________________________________
> Xorp-hackers mailing list
> Xorp-hackers at icir.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers
More information about the Xorp-hackers
mailing list