Mercurial > dnsbl
diff src/context.cpp @ 148:9330b8d6a56b
add documentation fixes, allow env_from target of inherit
author | carl |
---|---|
date | Tue, 30 Jan 2007 16:27:49 -0800 |
parents | 7278c9766e26 |
children | 9581f6e62574 |
line wrap: on
line diff
--- a/src/context.cpp Mon Dec 04 21:49:09 2006 -0800 +++ b/src/context.cpp Tue Jan 30 16:27:49 2007 -0800 @@ -572,7 +572,7 @@ char *CONTEXT::find_from(char *from) { - char *rc = token_inherit; + char *rc = env_from_default; string_map::iterator i = env_from.find(from); if (i != env_from.end()) rc = (*i).second; // found user@domain key else { @@ -590,7 +590,6 @@ } } } - if (rc == token_inherit) rc = env_from_default; if ((rc == token_inherit) && parent) return parent->find_from(from); return (rc == token_inherit) ? token_unknown : rc; } @@ -1179,7 +1178,7 @@ else { // may be a valid email address or domain name char *st = tok.next(); - if ((st == token_black) || (st == token_white) || (st == token_unknown)) { + if ((st == token_white) || (st == token_black) || (st == token_unknown) || (st == token_inherit)) { me.add_from(have, st); } else { @@ -1188,7 +1187,7 @@ me.add_from_context(have, con); } else { - tok.token_error("white/black/unknown or child context name", st); + tok.token_error("white/black/unknown/inherit or child context name", st); return false; } }