-const char filters_rcs[] = "$Id: filters.c,v 1.129 2010/05/01 18:20:50 fabiankeil Exp $";
+const char filters_rcs[] = "$Id: filters.c,v 1.130 2010/05/24 11:38:22 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/filters.c,v $
/*********************************************************************
*
- * Function : execute_content_filter
+ * Function : execute_content_filters
*
* Description : Executes a given content filter.
*
* Parameters :
* 1 : csp = Current client state (buffers, headers, etc...)
- * 2 : content_filter = The filter function to execute
*
* Returns : Pointer to the modified buffer, or
* NULL if filtering failed or wasn't necessary.
*
*********************************************************************/
-char *execute_content_filter(struct client_state *csp, filter_function_ptr content_filter)
+char *execute_content_filters(struct client_state *csp)
{
+ filter_function_ptr content_filter;
+
+ assert(content_filters_enabled(csp->action));
+
if (0 == csp->iob->eod - csp->iob->cur)
{
/*
return NULL;
}
+ content_filter = get_filter_function(csp);
+
return ((*content_filter)(csp));
}
#ifndef FILTERS_H_INCLUDED
#define FILTERS_H_INCLUDED
-#define FILTERS_H_VERSION "$Id: filters.h,v 1.37 2009/05/16 13:27:20 fabiankeil Exp $"
+#define FILTERS_H_VERSION "$Id: filters.h,v 1.38 2010/05/01 18:20:50 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/filters.h,v $
*/
typedef char *(*filter_function_ptr)();
-extern char *execute_content_filter(struct client_state *csp, filter_function_ptr content_filter);
+extern char *execute_content_filters(struct client_state *csp);
extern filter_function_ptr get_filter_function(struct client_state *csp);
extern char *execute_single_pcrs_command(char *subject, const char *pcrs_command, int *hits);
-const char jcc_rcs[] = "$Id: jcc.c,v 1.326 2010/07/29 14:32:08 fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.327 2010/09/03 17:40:37 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.c,v $
*/
if (content_filter)
{
- p = execute_content_filter(csp, content_filter);
+ p = execute_content_filters(csp);
/*
- * If the content filter fails, use the original
+ * If content filtering fails, use the original
* buffer and length.
* (see p != NULL ? p : csp->iob->cur below)
*/