diff src/context.h @ 160:b3ed72ee6564

allow manual updates to auto whitelist files
author carl
date Tue, 10 Jul 2007 11:20:23 -0700
parents a220bfb9211f
children c4bce911c276
line wrap: on
line diff
--- a/src/context.h	Sun Jul 08 11:57:51 2007 -0700
+++ b/src/context.h	Tue Jul 10 11:20:23 2007 -0700
@@ -39,7 +39,7 @@
 typedef map<char *, CONTEXTP, ltstr>	  context_map;
 typedef map<char *, int, ltstr> 		  ns_mapper;
 typedef map<char *, int, ltstr> 		  rcpt_rates;
-typedef map<char *, int, ltstr> 		  autowhite_sent;
+typedef map<char *, time_t,  ltstr> 	  autowhite_sent;
 typedef map<char *, VERIFYP, ltstr> 	  verify_map;
 typedef map<char *, WHITELISTERP, ltstr>  whitelister_map;
 
@@ -95,10 +95,12 @@
 	char			*fn;		// file to use
 	int 			days;		// how long do we keep entries
 	pthread_mutex_t mutex;		// protect the flag and map
+	time_t			loaded; 	// when we loaded this file
 	bool			need;		// force writing on new entries
 	autowhite_sent	rcpts;		// recipient map to remember when we sent them mail
 public:
 	WHITELISTER(char *f, int d);
+	void	merge();
 	void	writer();			// dump any changes back to the file
 	void	sent(char *to);
 	bool	is_white(char *from);	// should we white list this sender (did we send them anything recently)