• M
    qmp: Drop duplicated QMP command object checks · 104fc302
    Markus Armbruster 提交于
    qmp_check_input_obj() duplicates qmp_dispatch_check_obj(), except the
    latter screws up an error message.  handle_qmp_command() runs first
    the former, then the latter via qmp_dispatch(), masking the screwup.
    
    qemu-ga also masks the screwup, because it also duplicates checks,
    just differently.
    
    qmp_check_input_obj() exists because handle_qmp_command() needs to
    examine the command before dispatching it.  The previous commit got
    rid of this need, except for a tracepoint, and a bit of "id" code that
    relies on qdict not being null.
    
    Fix up the error message in qmp_dispatch_check_obj(), drop
    qmp_check_input_obj() and the tracepoint.  Protect the "id" code with
    a conditional.
    Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
    Reviewed-by: NEric Blake <eblake@redhat.com>
    Message-Id: <1488544368-30622-9-git-send-email-armbru@redhat.com>
    104fc302
qmp-dispatch.c 3.7 KB