Optimization: remove unnecessary buffer resizes on partial recvs
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 27 May 2017 15:54:30 +0000 (11:54 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 28 May 2017 13:19:12 +0000 (09:19 -0400)
commit14fa22f89d786cf4cd9f7d4b89a4fd72e3fa9d3a
tree22ccc36d86a988f0632e280ddb28d97d45d813a2
parent63557623eba8b58076e0454731a2d52e2ac5966b
Optimization: remove unnecessary buffer resizes on partial recvs

Using the dynamic buffer's size to express the current offset
results in unnecessary resized and re-zeroing of areas of the
buffer.

The reception buffer's size is now used to express the total
size of the expected incoming message. The offset can be inferred
from the "bytes_left_to_receive" variable and message size. It
also, arguably, makes the code simpler to follow.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/notification-thread-events.c
This page took 0.034299 seconds and 4 git commands to generate.