X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Fchannel.cpp;fp=src%2Flib%2Flttng-ctl%2Fchannel.cpp;h=d1d92d00d5497b9f8cdf27525b2db9591e9f678a;hp=3f3c53996ff2f461dda6b0d0030ee5f5dad89781;hb=63ae8472c752d86217fb28671ea9e9199fdca993;hpb=bdfd0a8e966634bb14999ff7d3729a08881485e8 diff --git a/src/lib/lttng-ctl/channel.cpp b/src/lib/lttng-ctl/channel.cpp index 3f3c53996..d1d92d00d 100644 --- a/src/lib/lttng-ctl/channel.cpp +++ b/src/lib/lttng-ctl/channel.cpp @@ -53,6 +53,10 @@ int receive_message(struct lttng_notification_channel *channel) goto error; } + if (msg.size == 0) { + goto skip_payload; + } + /* Reserve space for the payload. */ ret = lttng_dynamic_buffer_set_size(&channel->reception_payload.buffer, channel->reception_payload.buffer.size + msg.size); @@ -68,6 +72,7 @@ int receive_message(struct lttng_notification_channel *channel) goto error; } +skip_payload: /* Receive message fds. */ if (msg.fds != 0) { ret = lttcomm_recv_payload_fds_unix_sock(channel->socket,