]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: agent: ignore garbage while waiting for sync reply
authorNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Fri, 16 Sep 2016 10:35:33 +0000 (13:35 +0300)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 20 Sep 2016 14:27:58 +0000 (16:27 +0200)
commit832d48d790debbd3e8681ed26fc169871ef4fefd
treec91157c73f19c30291df23a00ae2d2a21b5a8479
parent4fd25421e3c2bda3a946c34c0cc14f66409709c2
qemu: agent: ignore garbage while waiting for sync reply

After sync is sent we can receive garbare and this is not error.
Consider next regular case:

1. libvirtd sends sync
2. qga sends partial sync reply and die
3. libvirtd sends sync
4. qga sends sync reply
5. libvirtd receives garbage
  (half of first reply and second reply together)

We should handle this situation as it is recoverable.
Next sync can succeed. Let's report reply is NULL,
it will be converted to the VIR_ERR_AGENT_UNSYNCED
which signals client to retry.
src/qemu/qemu_agent.c