X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-app.c;h=fc8728dd21da9b4d68a417323f41fbe0c7a6f225;hp=e5d8b5707dea19b10810a89ecae52191b189fc15;hb=c30aaa51f34105a7f20b9ceb39866001843db6e6;hpb=a4b92340642035d1eafeb1eead0ad01f64d2007d diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index e5d8b5707..fc8728dd2 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -1667,6 +1667,7 @@ int ust_app_list_event_fields(struct lttng_event_field **fields) memcpy(tmp[count].field_name, uiter.field_name, LTTNG_UST_SYM_NAME_LEN); tmp[count].type = uiter.type; + tmp[count].nowrite = uiter.nowrite; memcpy(tmp[count].event.name, uiter.event_name, LTTNG_UST_SYM_NAME_LEN); tmp[count].event.loglevel = uiter.loglevel; @@ -2196,6 +2197,7 @@ int ust_app_start_trace(struct ltt_ust_session *usess, struct ust_app *app) ret = create_ust_app_metadata(ua_sess, usess->pathname, app); if (ret < 0) { + ret = LTTNG_ERR_UST_META_FAIL; goto error_rcu_unlock; } @@ -2227,6 +2229,7 @@ int ust_app_start_trace(struct ltt_ust_session *usess, struct ust_app *app) /* Got all streams */ lttng_fd_put(LTTNG_FD_APPS, 2); free(ustream); + ret = LTTNG_ERR_UST_STREAM_FAIL; break; } ustream->handle = ustream->obj->handle; @@ -2236,7 +2239,8 @@ int ust_app_start_trace(struct ltt_ust_session *usess, struct ust_app *app) /* Order is important */ cds_list_add_tail(&ustream->list, &ua_chan->streams.head); ret = snprintf(ustream->name, sizeof(ustream->name), "%s_%u", - ua_chan->name, ua_chan->streams.count++); + ua_chan->name, ua_chan->streams.count); + ua_chan->streams.count++; if (ret < 0) { PERROR("asprintf UST create stream"); /* @@ -2921,12 +2925,12 @@ int ust_app_validate_version(int sock) } /* Validate version */ - if (app->version.major > UST_APP_MAJOR_VERSION) { + if (app->version.major != UST_APP_MAJOR_VERSION) { goto error; } - DBG2("UST app PID %d is compatible with major version %d " - "(supporting <= %d)", app->pid, app->version.major, + DBG2("UST app PID %d is compatible with internal major version %d " + "(supporting == %d)", app->pid, app->version.major, UST_APP_MAJOR_VERSION); app->compatible = 1; rcu_read_unlock(); @@ -2934,8 +2938,8 @@ int ust_app_validate_version(int sock) return 0; error: - DBG2("UST app PID %d is not compatible with major version %d " - "(supporting <= %d)", app->pid, app->version.major, + DBG2("UST app PID %d is not compatible with internal major version %d " + "(supporting == %d)", app->pid, app->version.major, UST_APP_MAJOR_VERSION); app->compatible = 0; rcu_read_unlock();