After a successful kernel snapshot, the ret = LTTNG_OK was missing thus
returning 0 to the caller which was expecting LTTNG_OK.
Also, this patch fixes the live_timer_interval check at start that CAN
be -1 thus not trying to start it.
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
/*
* Record a kernel snapshot.
*
- * Return 0 on success or a LTTNG_ERR code.
+ * Return LTTNG_OK on success or a LTTNG_ERR code.
*/
static int record_kernel_snapshot(struct ltt_kernel_session *ksess,
struct snapshot_output *output, struct ltt_session *session,
(void) kernel_consumer_destroy_metadata(socket, ksess->metadata);
}
+ ret = LTTNG_OK;
+
error_consumer:
/* Close newly opened metadata stream. It's now on the consumer side. */
err = close(ksess->metadata_stream_fd);
assert(channel);
assert(channel->key);
- if (live_timer_interval == 0) {
+ if (live_timer_interval <= 0) {
return;
}