From: David Goulet Date: Mon, 4 Nov 2013 21:27:00 +0000 (-0500) Subject: Fix: missing LTTNG_OK return value for snapshot X-Git-Tag: v2.3.1~3 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ff1a2c3965e5222769364e9b1cbef06bd32066d3;p=lttng-tools.git Fix: missing LTTNG_OK return value for snapshot After a successful kernel snapshot, the ret = LTTNG_OK was missing thus returning 0 to the caller which was expecting LTTNG_OK. Acked-by: Mathieu Desnoyers Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/kernel.c b/src/bin/lttng-sessiond/kernel.c index 5eda07758..531f65488 100644 --- a/src/bin/lttng-sessiond/kernel.c +++ b/src/bin/lttng-sessiond/kernel.c @@ -927,6 +927,8 @@ int kernel_snapshot_record(struct ltt_kernel_session *ksess, (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);