- err = lttng_ust_objd_unref(event_objd);
- assert(!err);
- }
-objd_error:
- return ret;
-}
-
-static
-int lttng_abi_create_loglevel(int channel_objd,
- struct lttng_ust_event *event_param)
-{
- struct ltt_channel *channel = objd_private(channel_objd);
- struct session_loglevel *loglevel;
- int loglevel_objd, ret;
-
- event_param->name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
- loglevel_objd = objd_alloc(NULL, <tng_loglevel_ops);
- if (loglevel_objd < 0) {
- ret = loglevel_objd;
- goto objd_error;
- }
- /*
- * We tolerate no failure path after loglevel creation. It will
- * stay invariant for the rest of the session.
- */
- ret = ltt_loglevel_create(channel, event_param, &loglevel);
- if (ret < 0) {
- goto loglevel_error;
- }
- objd_set_private(loglevel_objd, loglevel);
- /* The loglevel holds a reference on the channel */
- objd_ref(channel_objd);
- return loglevel_objd;
-
-loglevel_error:
- {
- int err;
-
- err = lttng_ust_objd_unref(loglevel_objd);
- assert(!err);
- }
-objd_error:
- return ret;
-}
-
-static
-int lttng_abi_create_wildcard(int channel_objd,
- struct lttng_ust_event *event_param)
-{
- struct ltt_channel *channel = objd_private(channel_objd);
- struct session_wildcard *wildcard;
- int wildcard_objd, ret;
-
- event_param->name[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
- wildcard_objd = objd_alloc(NULL, <tng_wildcard_ops);
- if (wildcard_objd < 0) {
- ret = wildcard_objd;
- goto objd_error;
- }
- /*
- * We tolerate no failure path after wildcard creation. It will
- * stay invariant for the rest of the session.
- */
- ret = ltt_wildcard_create(channel, event_param, &wildcard);
- if (ret < 0) {
- goto wildcard_error;
- }
- objd_set_private(wildcard_objd, wildcard);
- /* The wildcard holds a reference on the channel */
- objd_ref(channel_objd);
- return wildcard_objd;
-
-wildcard_error:
- {
- int err;
-
- err = lttng_ust_objd_unref(wildcard_objd);