fix filter
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 22 Aug 2005 23:24:35 +0000 (23:24 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 22 Aug 2005 23:24:35 +0000 (23:24 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1053 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/lttv/filter.c
ltt/branches/poly/lttv/modules/text/batchAnalysis.c
ltt/branches/poly/lttv/modules/text/textDump.c

index e837068cb2bfc7ba8091a5ca4ac4932d463ba993..556bf179502dd9aa3749bbe285c05ea2d976f9a2 100644 (file)
@@ -1537,6 +1537,7 @@ lttv_filter_append_expression(LttvFilter* filter, const char *expression) {
 
   if(expression == NULL) return FALSE;
   if(filter == NULL) return FALSE;
+  if(expression[0] == '\0') return FALSE;  /* Empty expression */
 
   GString* s = g_string_new("");
   if(filter->expression != NULL) {
index 785ff1a86c27b45a8b2819c22c5f58bd1da98d19..ebb2248f8211d4ec9bb39bba5daccc82444bdaa6 100644 (file)
@@ -92,7 +92,7 @@ static gboolean process_traceset(void *hook_data, void *call_data)
   *(value_filter.v_pointer) = lttv_filter_new();
   g_debug("Filter string: %s",((GString*)*(value_expression.v_pointer))->str);
   
-  g_assert(lttv_filter_append_expression(*(value_filter.v_pointer),((GString*)*(value_expression.v_pointer))->str));
+  lttv_filter_append_expression(*(value_filter.v_pointer),((GString*)*(value_expression.v_pointer))->str);
   
   //lttv_traceset_context_add_hooks(tc,
   //before_traceset, after_traceset, NULL, before_trace, after_trace,
index 1335afc4c78a19b29d7992dece0fb4a41df75fd4..96773a6c08bbff6d333736a97c3852fc0ee696f7 100644 (file)
@@ -366,9 +366,9 @@ static int write_event_content(void *hook_data, void *call_data)
   /*
    * call to the filter if available
    */
-  if(!lttv_filter_tree_parse(filter->head,e,tfc->tf,tfc->t_context->t,tfs->process,tfc)) {
+  if(filter->head != NULL)
+    if(!lttv_filter_tree_parse(filter->head,e,tfc->tf,tfc->t_context->t,tfs->process,tfc))
       return FALSE;
-  }
   
   lttv_event_to_string(e, a_string, TRUE, a_field_names, tfs);
   g_string_append_printf(a_string,"\n");  
This page took 0.027848 seconds and 4 git commands to generate.