]> git.ipfire.org Git - thirdparty/libvirt.git/commit
rpc: Double buffer size instead of quadrupling buffer size.
authorRichard W.M. Jones <rjones@redhat.com>
Fri, 26 May 2017 11:23:42 +0000 (12:23 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Fri, 26 May 2017 12:53:31 +0000 (13:53 +0100)
commitb088f85d42a05a6c0c8418c02a67b48864ba95a3
tree758a723f5d5b807da70f608af820f37ab1b57741
parent8238fd6624f11a67ecd0f373083c3d8292b779de
rpc: Double buffer size instead of quadrupling buffer size.

When increasing the buffer size up to VIR_NET_MESSAGE_MAX, we
currently quadruple it each time.  This unfortunately means that we
cannot allow certain buffer sizes -- for example the current
VIR_NET_MESSAGE_MAX == 33554432 can never be "hit" since ‘newlen’
jumps from 16MB to 64MB.

Instead of quadrupling, double it each time.

Thanks: Daniel Berrange.
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
src/rpc/virnetmessage.c