aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/libxl_qmp.c
diff options
context:
space:
mode:
authorAnthony PERARD <anthony.perard@citrix.com>2011-11-04 12:38:22 +0000
committerAnthony PERARD <anthony.perard@citrix.com>2011-11-04 12:38:22 +0000
commit46e9ab5b1c86bded86eb95c124839c4db1b7c5fa (patch)
tree76e6fbb45a0cd782b66228eaa7c11dbdd9e3e2a8 /tools/libxl/libxl_qmp.c
parenta3671a3ba79aa8e952881ecdaf6dd5767cc7b094 (diff)
downloadxen-46e9ab5b1c86bded86eb95c124839c4db1b7c5fa.tar.gz
xen-46e9ab5b1c86bded86eb95c124839c4db1b7c5fa.tar.bz2
xen-46e9ab5b1c86bded86eb95c124839c4db1b7c5fa.zip
libxl: libxl_qmp: Better error message after a parse error.
By setting the next string to parse after having printed any error messages. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_qmp.c')
-rw-r--r--tools/libxl/libxl_qmp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/libxl/libxl_qmp.c b/tools/libxl/libxl_qmp.c
index ef36348d29..f61a87a89f 100644
--- a/tools/libxl/libxl_qmp.c
+++ b/tools/libxl/libxl_qmp.c
@@ -403,7 +403,6 @@ static int qmp_next(libxl__gc *gc, libxl__qmp_handler *qmp)
*end = '\0';
o = libxl__json_parse(gc, s);
- s = end + 2;
if (o) {
qmp_handle_response(qmp, o);
@@ -413,6 +412,8 @@ static int qmp_next(libxl__gc *gc, libxl__qmp_handler *qmp)
"Parse error of : %s\n", s);
return -1;
}
+
+ s = end + 2;
} else {
break;
}