# HG changeset patch # User carl # Date 1086667660 25200 # Node ID 6e9d0b2d07208ec9fe4fd818f7cd7dbc42712039 # Parent 038521f9490a308ab5ca4c9ee55c260773f38595 fix handling of missing include files diff -r 038521f9490a -r 6e9d0b2d0720 src/dnsbl.cpp --- a/src/dnsbl.cpp Mon May 31 09:55:03 2004 -0700 +++ b/src/dnsbl.cpp Mon Jun 07 21:07:40 2004 -0700 @@ -896,12 +896,12 @@ // static void load_conf_dcc(CONFIG &dc, char *name, char *fn); static void load_conf_dcc(CONFIG &dc, char *name, char *fn) { - dc.config_files.push_back(fn); - char *list = BLACK; - const int LINE_SIZE = 2000; ifstream is(fn); if (is.fail()) return; + dc.config_files.push_back(fn); + const int LINE_SIZE = 2000; char line[LINE_SIZE]; + char *list = BLACK; char *delim = " \t"; int curline = 0; while (!is.eof()) { @@ -959,6 +959,8 @@ static void load_conf(CONFIG &dc, char *fn); static void load_conf(CONFIG &dc, char *fn) { + ifstream is(fn); + if (is.fail()) return; dc.config_files.push_back(fn); map commands; enum {dummy, tld, content, hostlimit, htmllimit, htmltag, dnsbl, dnsbll, envfrom, envto, include, includedcc}; @@ -974,8 +976,6 @@ commands["include" ] = include; commands["include_dcc"] = includedcc; const int LINE_SIZE = 2000; - ifstream is(fn); - if (is.fail()) return; char line[LINE_SIZE]; char orig[LINE_SIZE]; char *delim = " \t";