projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: improve error handling for UST stream creation
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
ust-app.c
diff --git
a/src/bin/lttng-sessiond/ust-app.c
b/src/bin/lttng-sessiond/ust-app.c
index 98ea50fdb250a6f0f89b2c73240eb7dea4df05d9..85f705542776215e2ea53f6b3bd00a0a9e8d0929 100644
(file)
--- a/
src/bin/lttng-sessiond/ust-app.c
+++ b/
src/bin/lttng-sessiond/ust-app.c
@@
-2288,11
+2288,16
@@
int ust_app_start_trace(struct ltt_ust_session *usess, struct ust_app *app)
ret = ustctl_create_stream(app->sock, ua_chan->obj,
&ustream->obj);
if (ret < 0) {
ret = ustctl_create_stream(app->sock, ua_chan->obj,
&ustream->obj);
if (ret < 0) {
- /* Got all streams */
- lttng_fd_put(LTTNG_FD_APPS, 2);
+ /* Free unused memory and reset FD states. */
free(ustream);
free(ustream);
+ lttng_fd_put(LTTNG_FD_APPS, 2);
+ if (ret == -ENOENT) {
+ /* Got all streams. Continue normal execution. */
+ break;
+ }
+ /* Error at this point. Stop everything. */
ret = LTTNG_ERR_UST_STREAM_FAIL;
ret = LTTNG_ERR_UST_STREAM_FAIL;
-
brea
k;
+
goto error_rcu_unloc
k;
}
ustream->handle = ustream->obj->handle;
}
ustream->handle = ustream->obj->handle;
@@
-2651,12
+2656,6
@@
void ust_app_global_update(struct ltt_ust_session *usess, int sock)
/* FIXME: Should we quit here or continue... */
continue;
}
/* FIXME: Should we quit here or continue... */
continue;
}
-
- ret = set_ust_event_filter(ua_event, app);
- if (ret < 0) {
- /* FIXME: Should we quit here or continue... */
- continue;
- }
}
}
}
}
This page took
0.027476 seconds
and
4
git commands to generate.