Move "active" code out of debug statements
[lttv.git] / lttv / modules / text / textFilter.c
index 27425201dd9a246741031655165dc34a990adbbf..28b5c8ee9e7933b92986a90891426d699ff2a756 100644 (file)
@@ -67,6 +67,7 @@ void filter_analyze_file(void *hook_data) {
   LttvAttributeValue value;
 
   LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes());
+  gboolean retval;
 
   /*
         *      User may specify filtering options through static file
@@ -82,8 +83,6 @@ void filter_analyze_file(void *hook_data) {
 
   g_file_get_contents(a_file_name,&a_file_content,NULL,NULL);
   
-  g_assert(lttv_iattribute_find_by_path(attributes, "filter/expression",
-      LTTV_POINTER, &value));
 
   if(((GString*)*(value.v_pointer))->len != 0)
       g_string_append_c((GString*)*(value.v_pointer),'&');
@@ -91,6 +90,9 @@ void filter_analyze_file(void *hook_data) {
     g_string_append((GString*)*(value.v_pointer),a_file_content);
     g_string_append_c((GString*)*(value.v_pointer),')');
   
+  retval= lttv_iattribute_find_by_path(attributes, "filter/expression",
+    LTTV_POINTER, &value);
+  g_assert(retval);
 }
 
 /**
@@ -102,14 +104,13 @@ void filter_analyze_string(void *hook_data) {
   LttvAttributeValue value;
 
   LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes());
-  
+  gboolean retval;
+
   /*
         *      User may specify filtering options through static file
         *      and/or command line string.  From these sources, an 
         *      option string is rebuilded and sent to the filter core
         */
-  g_assert(lttv_iattribute_find_by_path(attributes, "filter/expression",
-      LTTV_POINTER, &value));
 
   if(((GString*)*(value.v_pointer))->len != 0)
       g_string_append_c((GString*)*(value.v_pointer),'&');
@@ -117,6 +118,9 @@ void filter_analyze_string(void *hook_data) {
     g_string_append((GString*)*(value.v_pointer),a_string);
     g_string_append_c((GString*)*(value.v_pointer),')');
 
+  retval= lttv_iattribute_find_by_path(attributes, "filter/expression",
+    LTTV_POINTER, &value);
+  g_assert(retval);
 }
 
 /**
@@ -168,9 +172,11 @@ static void init() {
   LttvAttributeValue value;
 
   LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes());
+  gboolean retval;
 
-  g_assert(lttv_iattribute_find_by_path(attributes, "filter/expression",
-      LTTV_POINTER, &value));
+  retval= lttv_iattribute_find_by_path(attributes, "filter/expression",
+    LTTV_POINTER, &value);
+  g_assert(retval);
   
   *(value.v_pointer) = g_string_new("");
 
@@ -200,6 +206,8 @@ static void init() {
  *     Destroy the current module
  */
 static void destroy() {
+  gboolean retval;
+
   g_info("Destroy textFilter");
 
   lttv_option_remove("expression");
@@ -212,8 +220,9 @@ static void destroy() {
 
   LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes());
 
-  g_assert(lttv_iattribute_find_by_path(attributes, "filter/expression",
-      LTTV_POINTER, &value));
+  retval= lttv_iattribute_find_by_path(attributes, "filter/expression",
+    LTTV_POINTER, &value);
+  g_assert(retval);
  
   g_string_free((GString*)*(value.v_pointer),TRUE);
   
This page took 0.025028 seconds and 4 git commands to generate.