mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-12 08:44:07 +00:00
QMP: Fix default response regression
Commit 030db6e89d
dropped do_info() usage from QMP and introduced
qmp_call_query_cmd(). However, the new function doesn't emit QMP's
default OK response when the handler doesn't return data.
Fix that by also calling monitor_protocol_emitter() when
ret_data == NULL, so that the default response is emitted.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
2c90fe2b71
commit
c01e688531
@ -4464,12 +4464,10 @@ static void qmp_call_query_cmd(Monitor *mon, const mon_cmd_t *cmd)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cmd->mhandler.info_new(mon, &ret_data);
|
cmd->mhandler.info_new(mon, &ret_data);
|
||||||
if (ret_data) {
|
|
||||||
monitor_protocol_emitter(mon, ret_data);
|
monitor_protocol_emitter(mon, ret_data);
|
||||||
qobject_decref(ret_data);
|
qobject_decref(ret_data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static void qmp_call_cmd(Monitor *mon, const mon_cmd_t *cmd,
|
static void qmp_call_cmd(Monitor *mon, const mon_cmd_t *cmd,
|
||||||
const QDict *params)
|
const QDict *params)
|
||||||
|
Loading…
Reference in New Issue
Block a user