tmp[i].loglevel = uevent->attr.loglevel;
switch (uevent->attr.loglevel_type) {
case LTTNG_UST_LOGLEVEL_ALL:
- tmp[i].type = LTTNG_EVENT_LOGLEVEL_ALL;
+ tmp[i].loglevel_type = LTTNG_EVENT_LOGLEVEL_ALL;
break;
case LTTNG_UST_LOGLEVEL_RANGE:
- tmp[i].type = LTTNG_EVENT_LOGLEVEL_RANGE;
+ tmp[i].loglevel_type = LTTNG_EVENT_LOGLEVEL_RANGE;
break;
case LTTNG_UST_LOGLEVEL_SINGLE:
- tmp[i].type = LTTNG_EVENT_LOGLEVEL_SINGLE;
+ tmp[i].loglevel_type = LTTNG_EVENT_LOGLEVEL_SINGLE;
break;
}
i++;
switch (ev->loglevel_type) {
case LTTNG_EVENT_LOGLEVEL_ALL:
lue->attr.loglevel_type = LTTNG_UST_LOGLEVEL_ALL;
+ lue->attr.loglevel = -1; /* Force to -1 */
break;
case LTTNG_EVENT_LOGLEVEL_RANGE:
lue->attr.loglevel_type = LTTNG_UST_LOGLEVEL_RANGE;
+ lue->attr.loglevel = ev->loglevel;
break;
case LTTNG_EVENT_LOGLEVEL_SINGLE:
lue->attr.loglevel_type = LTTNG_UST_LOGLEVEL_SINGLE;
+ lue->attr.loglevel = ev->loglevel;
break;
default:
ERR("Unknown ust loglevel type (%d)", ev->type);
goto error_free_event;
}
- /* Copy loglevel */
- lue->attr.loglevel = ev->loglevel;
/* Init node */
lttng_ht_node_init_str(&lue->node, lue->attr.name);