X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread-events.c;h=0fd97e4e2f1e95172f4c4cb2883d2dd627d18b95;hb=f811ee34f035e1cd7c205e4e774ebfff68fbabf8;hp=0bb75b6d81607954093695ab894b58326a70f0bb;hpb=47a32869a6b2f7014887d523943046c9c64e6458;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/notification-thread-events.c b/src/bin/lttng-sessiond/notification-thread-events.c index 0bb75b6d8..0fd97e4e2 100644 --- a/src/bin/lttng-sessiond/notification-thread-events.c +++ b/src/bin/lttng-sessiond/notification-thread-events.c @@ -1622,9 +1622,14 @@ int handle_notification_thread_client_in( } offset = client->communication.inbound.buffer.size; + /* + * The buffer's size starts out at the size of the command header. + * Once the command is determined, the "bytes_to_receive" are bumped + * to fit the remainder of the message being received. + */ ret = lttng_dynamic_buffer_set_size( &client->communication.inbound.buffer, - client->communication.inbound.bytes_to_receive); + client->communication.inbound.bytes_to_receive + offset); if (ret) { goto end; }