aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2017-11-09 13:30:59 +0100
committerNeale Ranns <nranns@cisco.com>2017-11-09 16:25:01 +0000
commit4e50d2f1f8adb1bef9187dab1b7cffdc7bc4fb8c (patch)
treef4c923a55df7ecea802237fdedf5f0f3cde59bd8 /src/vpp-api
parent67b1b2274771d9b9a67a37b8e3156317d4c93437 (diff)
VOM: Inspect: fix the bug
If key is passed without ":", results in segmentation fault. This patch fixes this issue. Change-Id: I4e6bb3431c261cc2ac752b966a11edd7aa3304a0 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vpp-api')
-rw-r--r--src/vpp-api/vom/inspect.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/vpp-api/vom/inspect.cpp b/src/vpp-api/vom/inspect.cpp
index c78128c2bb6..55b533bbbff 100644
--- a/src/vpp-api/vom/inspect.cpp
+++ b/src/vpp-api/vom/inspect.cpp
@@ -54,10 +54,9 @@ inspect::handle_input(const std::string& message, std::ostream& output)
}
} else if (message.find("keys") != std::string::npos) {
OM::dump(output);
- } else if (message.find("key") != std::string::npos) {
+ } else if (message.find("key:") != std::string::npos) {
std::vector<std::string> results;
boost::split(results, message, boost::is_any_of(":\n"));
-
OM::dump(results[1], output);
} else if (message.find("all") != std::string::npos) {
/*