mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
Ensure we always read a full buffer in tunnelled migration
The 'nbytes' variable was not re-initialized to the buffer size on each iteration of the tunnelled migration loop. While saferead() will ensure a full read, except on EOF, it is clearer to use the real buffer size * src/qemu/qemu_migration.c: Always read full buffer of data
This commit is contained in:
parent
dba5a60462
commit
74f332468d
@ -1300,7 +1300,7 @@ static int doTunnelSendAll(virStreamPtr st,
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
nbytes = saferead(sock, buffer, nbytes);
|
||||
nbytes = saferead(sock, buffer, TUNNEL_SEND_BUF_SIZE);
|
||||
if (nbytes < 0) {
|
||||
virReportSystemError(errno, "%s",
|
||||
_("tunnelled migration failed to read from qemu"));
|
||||
|
Loading…
Reference in New Issue
Block a user