Fix: notification: assert on len > 0 for dropped notification message
[lttng-tools.git] / src / lib / lttng-ctl / channel.c
index 882fb7be4d28900f4c7d8ea5b50c7e83db7cccef..44d86a357274e0f51d6f233ee9c291a9867fbe3a 100644 (file)
@@ -54,6 +54,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_buffer,
                        channel->reception_buffer.size + msg.size);
@@ -68,6 +72,8 @@ int receive_message(struct lttng_notification_channel *channel)
                ret = -1;
                goto error;
        }
+
+skip_payload:
        ret = 0;
 end:
        return ret;
This page took 0.023043 seconds and 4 git commands to generate.