--------------------- PatchSet 1420 Date: 2001/01/29 20:35:27 Author: rbcollins Branch: rbcollins_filters Tag: (none) Log: dynamic multi instance filters test base in place and compiles Members: src/client_side.c:1.1.1.3.4.1.4.15.2.8->1.1.1.3.4.1.4.15.2.9 Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v retrieving revision 1.1.1.3.4.1.4.15.2.8 retrieving revision 1.1.1.3.4.1.4.15.2.9 diff -u -r1.1.1.3.4.1.4.15.2.8 -r1.1.1.3.4.1.4.15.2.9 --- squid/src/client_side.c 29 Jan 2001 20:15:33 -0000 1.1.1.3.4.1.4.15.2.8 +++ squid/src/client_side.c 29 Jan 2001 20:35:27 -0000 1.1.1.3.4.1.4.15.2.9 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.1.1.3.4.1.4.15.2.8 2001/01/29 20:15:33 rbcollins Exp $ + * $Id: client_side.c,v 1.1.1.3.4.1.4.15.2.9 2001/01/29 20:35:27 rbcollins Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -1502,11 +1502,13 @@ /* setup an array of filter modules * 1) Compiled into the squid code, a filter "urlfilter" is registered */ - FILTER_module modules[0]; - FILTER_instance instances[1]; + FILTER_module modules[1]; + FILTER_instance instances[2]; + char *module_str; modules[0].namestr="textreplace"; modules[0].AddInstance=clientFilterOnUnload_AddInstance; + modules[0].RemInstance=clientFilterOnUnload_RemInstance; /* now for each module, #create an instance aka filter config @@ -1525,7 +1527,10 @@ filter_config onunload search onunload filter_config onunload replace nonsense */ - instances[0].Parse(instances[0].data,instances[0].module->namestr,"search onunload"); + if ((module_str = strtok("search onunload",w_space))==NULL) + /* self_destruct */ + ; + instances[0].Parse(instances[0].data,instances[0].module->namestr,module_str); instances[0].Parse(instances[0].data,instances[0].module->namestr,"replace nonsense"); /*