HomeClusterLabs Projects

transport: Fix writev_all

Description

transport: Fix writev_all

writev_all was using iov[i] in the loop and same time it was increasing
base address of iov (iov++; line) resulting in stack smashing for
iov with more than one element.

Also I believe stats update was on incorrect place because it was
increased for all iov items.

Lastly I found log_debug too verbose (and again on incorrect place)
because it was called for every single sent packet (too verbose) and
every single iov item (incorrect place) so it is removed completely.

It might be possible to change code to use iov[0] when needed but I
decided to also simplify/shorten code a bit.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>

Details

Provenance
jfriesseAuthored on Thu, Mar 20, 5:28 AM
Parents
rKed2b35013d2d: tx: Initialize datafd_hdr
Branches
Unknown
Tags
Unknown