From: Jérémie Galarneau Date: Thu, 2 Apr 2015 22:44:58 +0000 (-0400) Subject: Fix: Check that lttng create --live's time is not zero X-Git-Tag: v2.7.0-rc1~49 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=0ed9e0beb03a4ff1b0042526eb851c0125dbe795;p=lttng-tools.git Fix: Check that lttng create --live's time is not zero Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng/commands/create.c b/src/bin/lttng/commands/create.c index b8d9f3b56..ba62940c6 100644 --- a/src/bin/lttng/commands/create.c +++ b/src/bin/lttng/commands/create.c @@ -597,6 +597,11 @@ int cmd_create(int argc, const char **argv) ret = CMD_ERROR; goto end; } + if (v == 0) { + ERR("Live timer interval must be greater than zero"); + ret = CMD_ERROR; + goto end; + } opt_live_timer = (uint32_t) v; DBG("Session live timer interval set to %d", opt_live_timer); break;