qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL v2 09/24] libqtest: Fix qmp() & friends to abort on J


From: Markus Armbruster
Subject: [Qemu-devel] [PULL v2 09/24] libqtest: Fix qmp() & friends to abort on JSON parse errors
Date: Mon, 6 Mar 2017 15:11:40 +0100

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Message-Id: <address@hidden>
---
 tests/libqtest.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/libqtest.c b/tests/libqtest.c
index 9033c5f..a5c3d2b 100644
--- a/tests/libqtest.c
+++ b/tests/libqtest.c
@@ -21,6 +21,7 @@
 #include <sys/wait.h>
 #include <sys/un.h>
 
+#include "qapi/error.h"
 #include "qapi/qmp/json-parser.h"
 #include "qapi/qmp/json-streamer.h"
 #include "qapi/qmp/qjson.h"
@@ -442,7 +443,7 @@ void qmp_fd_sendv(int fd, const char *fmt, va_list ap)
      * is an array type.
      */
     va_copy(ap_copy, ap);
-    qobj = qobject_from_jsonv(fmt, &ap_copy, NULL);
+    qobj = qobject_from_jsonv(fmt, &ap_copy, &error_abort);
     va_end(ap_copy);
 
     /* No need to send anything for an empty QObject.  */
-- 
2.7.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]