• J
    qemu: fix response timeout for agent guest-sync · d9605abe
    Jonathon Jongsma 提交于
    The agent 'guest-sync' command historically had a 5s response timeout
    which was different from other agent commands, which waited forever.
    When we added the ability to customize the response timeout for guest
    agent commands, we intended to continue to use 5s for 'guest-sync' when
    the user specified a response timeout greater than 5s, and use the
    user-specified timeout if it was below 5s. Unfortunately, when
    attempting to determine whether the user-specified timeout was less than
    5s, we were comparing against an enum value of
    VIR_DOMAIN_QEMU_AGENT_COMMAND_DEFAULT (which is -1) rather than against
    the actual time value that it represented (5).
    
    This change makes it so that 'guest-sync' now uses the user-specified
    tiemout if it is less than 5s.
    Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com>
    Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
    Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
    d9605abe
qemu_agent.c 70.4 KB