projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: error handling in lttng enable-event
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
stop.c
diff --git
a/src/bin/lttng/commands/stop.c
b/src/bin/lttng/commands/stop.c
index fbabc510039f2f5fc8c5486b6240bf64d6326780..6ed67fdabcaaf0194cbbe911c3853609aa3720de 100644
(file)
--- a/
src/bin/lttng/commands/stop.c
+++ b/
src/bin/lttng/commands/stop.c
@@
-26,6
+26,8
@@
#include "../command.h"
#include "../command.h"
+#include <common/sessiond-comm/sessiond-comm.h>
+
static char *opt_session_name;
enum {
static char *opt_session_name;
enum {
@@
-75,7
+77,14
@@
static int stop_tracing(void)
ret = lttng_stop_tracing(session_name);
if (ret < 0) {
ret = lttng_stop_tracing(session_name);
if (ret < 0) {
- /* Don't set ret so lttng can interpret the sessiond error. */
+ switch (-ret) {
+ case LTTCOMM_TRACE_ALREADY_STOPPED:
+ WARN("Tracing already stopped for session %s", session_name);
+ break;
+ default:
+ ERR("%s", lttng_strerror(ret));
+ break;
+ }
goto free_name;
}
goto free_name;
}
This page took
0.023649 seconds
and
4
git commands to generate.