• L
    Monitor: Debug stray prints the right way · 10e4f606
    Luiz Capitulino 提交于
    QObject Monitor handlers should not call any Monitor print
    function: they should only build objects, printing is done
    by common code.
    
    Current QMP code will ignore such calls, as we can't send
    garbage to clients, additionally it will also emit an
    undefined error on the assumption that print calls usually
    report errors.
    
    However, the right way to deal with this is to rely on a
    return code. This has been fixed by other commit already.
    
    Now, this commit drops the error from monitor_vprintf() and
    adds a better debugging mechanism for those 'stray' prints:
    we count them if debug is enabled and let the developer know
    if a QObject handler is trying to print anything.
    Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
    Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
    10e4f606
monitor.c 124.7 KB