提交 74f33246 编写于 作者: D Daniel P. Berrange

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
上级 dba5a604
......@@ -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"));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册