*/
gboolean lttv_apply_op_eq_string(gpointer v1, LttvFieldValue v2) {
char* r = (char*) v1;
+ g_print("v1:%s = v2:%s\n",r,v2.v_string);
return (!g_strcasecmp(r,v2.v_string));
}
* in a_field_path array.
*/
/* FIXME: check for double values */
-// if(a_simple_expression->op == NULL) {
+ if(a_simple_expression->field == LTTV_FILTER_UNDEFINED) {
g_ptr_array_add( a_field_path,(gpointer) a_field_component );
a_field_component = g_string_new("");
-// }
+ }
+ break;
+ case ' ':
+ case '\n':
break;
-// case ' ':
-// case '\n':
-// ignore
default: /* concatening current string */
g_string_append_c(a_field_component,filter->expression[i]);
}
}
/**
- * LttvFilterTree* lttv_filter_tree_new()
+ * @fn LttvFilterTree* lttv_filter_tree_new()
*
* Assign a new tree for the current expression
* or sub expression
}
/**
- * gboolean lttv_filter_tree_parse(LttvFilterTree*,LttEvent,LttTracefile,LttTrace,LttvProcessState)
+ * @fn gboolean lttv_filter_tree_parse(LttvFilterTree*,LttEvent,LttTracefile,LttTrace,LttvProcessState)
*
* Global parsing function for the current
* LttvFilterTree
case LTTV_LOGICAL_AND: return (lresult & rresult);
case LTTV_LOGICAL_NOT: return (!rresult);
case LTTV_LOGICAL_XOR: return (lresult ^ rresult);
+ case 0: return (rresult);
default:
/*
* This case should never be
}
/**
- * gboolean lttv_filter_tracefile(LttvFilter*, LttTracefile*)
+ * @fn gboolean lttv_filter_tracefile(LttvFilter*, LttTracefile*)
*
* Apply the filter to a specific trace
* @param filter the current filter applied
}
/**
- * Destroys the filter module and specific values
+ * @fn Destroys the filter module and specific values
*/
static void module_destroy()
{
/*
* call to the filter if available
*/
- lttv_filter_tree_parse(a_lttv_filter->head,e,NULL,NULL,NULL);
+ if(!lttv_filter_tree_parse(a_lttv_filter->head,e,NULL,NULL,NULL)) {
+ return FALSE;
+ }
lttv_event_to_string(e, a_string, TRUE, a_field_names, tfs);
g_string_append_printf(a_string,"\n");
if(((GString*)*(value.v_pointer))->len != 0) g_string_append_c((GString*)*(value.v_pointer),'&');
g_string_append((GString*)*(value.v_pointer),a_string);
- LttvFilter* filter = lttv_filter_new();
- lttv_filter_append_expression(filter,a_string);
+// LttvFilter* filter = lttv_filter_new();
+// lttv_filter_append_expression(filter,a_string);
}
/**