projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: bad logical check of error codes
[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 72a3223c1fa53baa0bf8f413e9e9e99d7e6d335d..ab08ac0e4d04ccf409c8d02e358e11f0033a0520 100644
(file)
--- a/
src/bin/lttng-sessiond/ust-app.c
+++ b/
src/bin/lttng-sessiond/ust-app.c
@@
-406,7
+406,8
@@
void delete_ust_app_channel(int sock, struct ust_app_channel *ua_chan,
if (ua_chan->obj != NULL) {
/* Remove channel from application UST object descriptor. */
iter.iter.node = &ua_chan->ust_objd_node.node;
if (ua_chan->obj != NULL) {
/* Remove channel from application UST object descriptor. */
iter.iter.node = &ua_chan->ust_objd_node.node;
- lttng_ht_del(app->ust_objd, &iter);
+ ret = lttng_ht_del(app->ust_objd, &iter);
+ assert(!ret);
ret = ustctl_release_object(sock, ua_chan->obj);
if (ret < 0 && ret != -EPIPE && ret != -LTTNG_UST_ERR_EXITING) {
ERR("UST app sock %d release channel obj failed with ret %d",
ret = ustctl_release_object(sock, ua_chan->obj);
if (ret < 0 && ret != -EPIPE && ret != -LTTNG_UST_ERR_EXITING) {
ERR("UST app sock %d release channel obj failed with ret %d",
@@
-495,6
+496,11
@@
push_data:
if (ret == -LTTCOMM_CONSUMERD_CHANNEL_FAIL) {
ret = 0;
}
if (ret == -LTTCOMM_CONSUMERD_CHANNEL_FAIL) {
ret = 0;
}
+
+ /* Update back the actual metadata len sent since it failed here. */
+ pthread_mutex_lock(®istry->lock);
+ registry->metadata_len_sent -= len;
+ pthread_mutex_unlock(®istry->lock);
ret_val = ret;
goto error_push;
}
ret_val = ret;
goto error_push;
}
@@
-3142,7
+3148,7
@@
int ust_app_list_events(struct lttng_event **events)
/* Handle ustctl error. */
if (ret < 0) {
free(tmp_event);
/* Handle ustctl error. */
if (ret < 0) {
free(tmp_event);
- if (ret != -LTTNG_UST_ERR_EXITING
||
ret != -EPIPE) {
+ if (ret != -LTTNG_UST_ERR_EXITING
&&
ret != -EPIPE) {
ERR("UST app tp list get failed for app %d with ret %d",
app->sock, ret);
} else {
ERR("UST app tp list get failed for app %d with ret %d",
app->sock, ret);
} else {
@@
-3242,7
+3248,7
@@
int ust_app_list_event_fields(struct lttng_event_field **fields)
/* Handle ustctl error. */
if (ret < 0) {
free(tmp_event);
/* Handle ustctl error. */
if (ret < 0) {
free(tmp_event);
- if (ret != -LTTNG_UST_ERR_EXITING
||
ret != -EPIPE) {
+ if (ret != -LTTNG_UST_ERR_EXITING
&&
ret != -EPIPE) {
ERR("UST app tp list field failed for app %d with ret %d",
app->sock, ret);
} else {
ERR("UST app tp list field failed for app %d with ret %d",
app->sock, ret);
} else {
This page took
0.025599 seconds
and
4
git commands to generate.