Mercurial > dnsbl
diff src/dnsbl.cpp @ 39:6e9d0b2d0720
fix handling of missing include files
author | carl |
---|---|
date | Mon, 07 Jun 2004 21:07:40 -0700 |
parents | 95607fbef608 |
children | dc3d8d1aa2d2 |
line wrap: on
line diff
--- 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<char*, int, ltstr> 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";