Ethereal-dev: [Ethereal-dev] Patch request for 'filters.c'

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Fabrizio Bertocci <fabrizio@xxxxxxx>
Date: Thu, 16 Feb 2006 14:06:27 -0800
Hi,
The patch attached modify the default behavior of the function 'read_filter_list' to attempt read cfilters/dfilters from the Ethereal data directory, in case no cfilters/dfilters are found in user's home directory. With this patch you can ship Ethereal with some predefined capture/display filters (you obviously still need to change the installer script to include those files). If you guys think it's a useful feature, can we integrate it in the development tree ?

Regards,
Fabrizio Bertocci
Real-Time Innovations, Inc.




--- ethereal-0.10.14.original/filters.c	2005-12-26 18:21:20.000000000 -0800
+++ ethereal-0.10.14.new/filters.c	2006-02-16 10:45:21.000000000 -0800
@@ -116,6 +116,9 @@
   /* try to open personal "cfilters"/"dfilters" file */
   ff_path = get_persconffile_path(ff_name, FALSE);
   if ((ff = eth_fopen(ff_path, "r")) == NULL) {
+    ff_path = get_datafile_path(ff_name);
+  }
+  if ((ff = eth_fopen(ff_path, "r")) == NULL) {
     /*
      * Did that fail because the file didn't exist?
      */