DBG("[notification-thread] Added new notification channel client socket (%i) to poll set",
client->socket);
- /* Add to ht. */
rcu_read_lock();
cds_lfht_add(state->client_socket_ht,
hash_client_socket(client->socket),
handshake_client =
(struct lttng_notification_channel_command_handshake *)
client->communication.inbound.buffer.data;
- client->major = handshake_client->major;
+ client->major = handshake_client->major;
client->minor = handshake_client->minor;
if (!client->communication.inbound.creds_received) {
ERR("[notification-thread] No credentials received from client");
}
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;
}