diff src/context.cpp @ 162:c4bce911c276 stable-6-03

don't add auto whitelist for A to A
author carl
date Sat, 14 Jul 2007 12:25:17 -0700
parents b3ed72ee6564
children 97d7da45fe2a
line wrap: on
line diff
--- a/src/context.cpp	Tue Jul 10 14:09:23 2007 -0700
+++ b/src/context.cpp	Sat Jul 14 12:25:17 2007 -0700
@@ -516,14 +516,9 @@
 
 
 bool WHITELISTER::is_white(char *from) {
-	bool rc = false;
 	pthread_mutex_lock(&mutex);
 		autowhite_sent::iterator i = rcpts.find(from);
-		if (i != rcpts.end()) {
-			time_t when = (*i).second;
-			time_t now = time(NULL);
-			rc = (when+(days*8640) > now);
-		}
+		bool rc = (i != rcpts.end());
 	pthread_mutex_unlock(&mutex);
 	return rc;
 }
@@ -738,11 +733,11 @@
 }
 
 
-WHITELISTERP CONTEXT::find_autowhite(char *to) {
-	if (whitelister && cover_env_to(to))
+WHITELISTERP CONTEXT::find_autowhite(char *from, char *to) {
+	if (whitelister && cover_env_to(to) && !cover_env_to(from))
 		return whitelister;
 	else if (parent)
-		return parent->find_autowhite(to);
+		return parent->find_autowhite(from, to);
 	else
 		return NULL;
 }