qmp-dispatch.c (7e0019a7196ebed177c95824875cf852e1a6f667) qmp-dispatch.c (7dc847ebba953db90853d15f140c20eef74d4fb2)
1/*
2 * Core Definitions for QAPI/QMP Dispatch
3 *
4 * Copyright IBM, Corp. 2011
5 *
6 * Authors:
7 * Anthony Liguori <aliguori@us.ibm.com>
8 *

--- 12 unchanged lines hidden (view full) ---

21static QDict *qmp_dispatch_check_obj(const QObject *request, Error **errp)
22{
23 const QDictEntry *ent;
24 const char *arg_name;
25 const QObject *arg_obj;
26 bool has_exec_key = false;
27 QDict *dict = NULL;
28
1/*
2 * Core Definitions for QAPI/QMP Dispatch
3 *
4 * Copyright IBM, Corp. 2011
5 *
6 * Authors:
7 * Anthony Liguori <aliguori@us.ibm.com>
8 *

--- 12 unchanged lines hidden (view full) ---

21static QDict *qmp_dispatch_check_obj(const QObject *request, Error **errp)
22{
23 const QDictEntry *ent;
24 const char *arg_name;
25 const QObject *arg_obj;
26 bool has_exec_key = false;
27 QDict *dict = NULL;
28
29 dict = qobject_to_qdict(request);
29 dict = qobject_to(QDict, request);
30 if (!dict) {
31 error_setg(errp, "QMP input must be a JSON object");
32 return NULL;
33 }
34
35 for (ent = qdict_first(dict); ent;
36 ent = qdict_next(dict, ent)) {
37 arg_name = qdict_entry_key(ent);

--- 106 unchanged lines hidden ---
30 if (!dict) {
31 error_setg(errp, "QMP input must be a JSON object");
32 return NULL;
33 }
34
35 for (ent = qdict_first(dict); ent;
36 ent = qdict_next(dict, ent)) {
37 arg_name = qdict_entry_key(ent);

--- 106 unchanged lines hidden ---