Fix: Check that lttng create --live's time is not zero
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 2 Apr 2015 22:44:58 +0000 (18:44 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 2 Apr 2015 22:44:58 +0000 (18:44 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng/commands/create.c

index b8d9f3b5655c56975bfa1716a08065b86ca1ca14..ba62940c62fbb4dec65057d9942250d6c7d8fa7a 100644 (file)
@@ -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;
This page took 0.034428 seconds and 4 git commands to generate.