diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-11-27 13:51:17 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-27 14:30:26 -0800 |
commit | 77aa7ca8d65ac5dc7b46ad9ef79e3f6aed9b4d0e (patch) | |
tree | 65e821f25a0fada620392b1e0695b965c40eb2d8 /src/server/httpd/menu_cuts/top_right.png | |
parent | a0d983ab0616581559634c7217a8eecf61f4d65b (diff) | |
download | openocd_libswd-77aa7ca8d65ac5dc7b46ad9ef79e3f6aed9b4d0e.tar.gz openocd_libswd-77aa7ca8d65ac5dc7b46ad9ef79e3f6aed9b4d0e.tar.bz2 openocd_libswd-77aa7ca8d65ac5dc7b46ad9ef79e3f6aed9b4d0e.tar.xz openocd_libswd-77aa7ca8d65ac5dc7b46ad9ef79e3f6aed9b4d0e.zip |
fix regression causing duplicated output
The command refactoring caused subcommand handlers to produce duplicate
output when run. The problem was introduced by failing to ensure all
such invocations went through a top-level "catcher" script, prefixing
the command name with the 'ocd_' prefix and consuming its results.
The fix is to ensure such a top-level "catcher" script gets created
for each top-level command, regardless of whether it has a handler.
Indeed, this patch removes all command registrations for sub-commands,
which would not have worked in the new registration scheme anyway.
For now, dispatch of subcommands continues to be handled by the new
'unknown' command handler, which gets fixed here to strip the 'ocd_'
prefix if searching for the top-level command name fails initially.
Some Jim commands may be registered with this prefix, and that situation
seems to require the current fallback approach. Otherwise, that prefix
could be stripped unconditionally and the logic made a little simpler.
The same problem must be handled by the 'help' command handler too,
so its lookup process works as intended.
Overall, the command dispatching remains more complicated than desired,
but this patch fixes the immediate regressions.
Diffstat (limited to 'src/server/httpd/menu_cuts/top_right.png')
0 files changed, 0 insertions, 0 deletions