mega fix for states : per cpu and _not_ per tracefile state. We have many tracefiles...
[lttv.git] / ltt / branches / poly / lttv / lttv / filter.c
index 605a3d9f1bebf48b1b1aeb4028397f80d69df896..d6defdf713729f1c0f05bd498a5b1d67189962ba 100644 (file)
@@ -75,6 +75,7 @@
 
 #include <lttv/filter.h>
 #include <ltt/trace.h>
+#include <ltt/type.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -423,14 +424,14 @@ lttv_simple_expression_assign_value(LttvSimpleExpression* se, char* value) {
               /* cannot specify number with more than one '.' */
               if(is_double) return FALSE; 
               else is_double = TRUE;
-              t.tv_sec = atoi(v);
+              t.tv_sec = atoi(v->str);
               g_string_free(v,TRUE);
               v = g_string_new("");
           } else g_string_append_c(v,value[i]);
        }
        /* number can be integer or double */
-       if(is_double) t.tv_nsec = atoi(v);
-       else t.tv_sec = atoi(v);
+       if(is_double) t.tv_nsec = atoi(v->str);
+       else t.tv_sec = atoi(v->str);
        
        g_string_free(v,TRUE);
        
@@ -1785,9 +1786,11 @@ lttv_filter_tree_parse_branch(
         case LTTV_FILTER_STATE_CPU:
             if(context == NULL) return TRUE;
             else {
-              /* FIXME: not sure of that one */
-              GQuark quark = ((LttvTracefileState*)context)->cpu_name;
-              return se->op((gpointer)&quark,v);
+              /* FIXME: not sure of that one  Mathieu : fixed.*/
+ //             GQuark quark = ((LttvTracefileState*)context)->cpu_name;
+ //                return se->op((gpointer)&quark,v);
+              if(state == NULL) return TRUE;
+              else return se->op((gpointer)&state->cpu,v);
             }
             break;
         case LTTV_FILTER_EVENT_NAME:
This page took 0.023267 seconds and 4 git commands to generate.