current actions.c,1.96,1.97

Fabian Keil <[email protected]>
Newsgroups gmane.comp.web.privoxy.cvs
Message-ID <[email protected]>
Update of /cvsroot/ijbswa/current
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv28525

Modified Files:
	actions.c 
Log Message:
When complaining about missing filters, mention the filter type


Index: actions.c
===================================================================
RCS file: /cvsroot/ijbswa/current/actions.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -C2 -d -r1.96 -r1.97
*** actions.c	26 Feb 2016 12:29:38 -0000	1.96
--- actions.c	3 May 2016 13:20:37 -0000	1.97
***************
*** 1083,1086 ****
--- 1083,1124 ----
  /*********************************************************************
   *
+  * Function    :  filter_type_to_string
+  *
+  * Description :  Converts a filter type enum into a string.
+  *
+  * Parameters  :
+  *          1  :  filter_type = filter_type as enum
+  *
+  * Returns     :  Pointer to static string.
+  *
+  *********************************************************************/
+ static const char *filter_type_to_string(enum filter_type filter_type)
+ {
+    switch (filter_type)
+    {
+    case FT_CONTENT_FILTER:
+       return "content filter";
+    case FT_CLIENT_HEADER_FILTER:
+       return "client-header filter";
+    case FT_SERVER_HEADER_FILTER:
+       return "server-header filter";
+    case FT_CLIENT_HEADER_TAGGER:
+       return "client-header tagger";
+    case FT_SERVER_HEADER_TAGGER:
+       return "server-header tagger";
+ #ifdef FEATURE_EXTERNAL_FILTERS
+    case FT_EXTERNAL_CONTENT_FILTER:
+       return "external content filter";
+ #endif
+    case FT_INVALID_FILTER:
+       return "invalid filter type";
+    }
+ 
+    return "unknown filter type";
+ 
+ }
+ 
+ /*********************************************************************
+  *
   * Function    :  referenced_filters_are_missing
   *
***************
*** 1107,1111 ****
        if (NULL == get_filter(csp, filtername->str, filter_type))
        {
!          log_error(LOG_LEVEL_ERROR, "Missing filter '%s'", filtername->str);
           return 1;
        }
--- 1145,1150 ----
        if (NULL == get_filter(csp, filtername->str, filter_type))
        {
!          log_error(LOG_LEVEL_ERROR, "Missing %s '%s'",
!             filter_type_to_string(filter_type), filtername->str);
           return 1;
        }


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.