wildcards & loglevels: fix list field for iteration
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 8 Dec 2011 00:57:59 +0000 (19:57 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 8 Dec 2011 00:57:59 +0000 (19:57 -0500)
Was causing segmentation fault on loglevel & wildcard disable operation.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/ltt-probes.c

index 9667497aac6e5f66f8309237365c6ac1851f5578..216ed17cc2cc5d03bb24583ab4371004c02d7090 100644 (file)
@@ -375,8 +375,9 @@ void _remove_loglevel(struct session_loglevel *loglevel)
         * loglevel from the list. The session teardown will take care
         * of freeing the event memory.
         */
-       cds_list_for_each_entry_safe(ev, tmp, &loglevel->events, list) {
-               cds_list_del(&ev->list);
+       cds_list_for_each_entry_safe(ev, tmp, &loglevel->events,
+                       loglevel_list) {
+               cds_list_del(&ev->loglevel_list);
        }
        cds_list_del(&loglevel->session_list);
        cds_list_del(&loglevel->list);
@@ -394,7 +395,7 @@ int ltt_loglevel_enable(struct session_loglevel *loglevel)
 
        if (loglevel->enabled)
                return -EEXIST;
-       cds_list_for_each_entry(ev, &loglevel->events, list) {
+       cds_list_for_each_entry(ev, &loglevel->events, loglevel_list) {
                ret = ltt_event_enable(ev);
                if (ret) {
                        DBG("Error: enable error.\n");
@@ -412,7 +413,7 @@ int ltt_loglevel_disable(struct session_loglevel *loglevel)
 
        if (!loglevel->enabled)
                return -EEXIST;
-       cds_list_for_each_entry(ev, &loglevel->events, list) {
+       cds_list_for_each_entry(ev, &loglevel->events, loglevel_list) {
                ret = ltt_event_disable(ev);
                if (ret) {
                        DBG("Error: disable error.\n");
@@ -565,8 +566,9 @@ void _remove_wildcard(struct session_wildcard *wildcard)
         * wildcard from the list. The session teardown will take care
         * of freeing the event memory.
         */
-       cds_list_for_each_entry_safe(ev, tmp, &wildcard->events, list) {
-               cds_list_del(&ev->list);
+       cds_list_for_each_entry_safe(ev, tmp, &wildcard->events,
+                       wildcard_list) {
+               cds_list_del(&ev->wildcard_list);
        }
        cds_list_del(&wildcard->session_list);
        cds_list_del(&wildcard->list);
@@ -584,7 +586,7 @@ int ltt_wildcard_enable(struct session_wildcard *wildcard)
 
        if (wildcard->enabled)
                return -EEXIST;
-       cds_list_for_each_entry(ev, &wildcard->events, list) {
+       cds_list_for_each_entry(ev, &wildcard->events, wildcard_list) {
                ret = ltt_event_enable(ev);
                if (ret) {
                        DBG("Error: enable error.\n");
@@ -602,7 +604,7 @@ int ltt_wildcard_disable(struct session_wildcard *wildcard)
 
        if (!wildcard->enabled)
                return -EEXIST;
-       cds_list_for_each_entry(ev, &wildcard->events, list) {
+       cds_list_for_each_entry(ev, &wildcard->events, wildcard_list) {
                ret = ltt_event_disable(ev);
                if (ret) {
                        DBG("Error: disable error.\n");
This page took 0.026378 seconds and 4 git commands to generate.