comparison src/dnsbl.cpp @ 140:4028de9b46dd

cleanup smtp rate limit code
author carl
date Wed, 27 Sep 2006 08:00:13 -0700
parents 003026deaed1
children b82e00146672
comparison
equal deleted inserted replaced
139:003026deaed1 140:4028de9b46dd
1178 if (loop == 20) { 1178 if (loop == 20) {
1179 // three minutes thru each loop, 20 loops per hour 1179 // three minutes thru each loop, 20 loops per hour
1180 // clear the recipient counts 1180 // clear the recipient counts
1181 pthread_mutex_lock(&rate_mutex); 1181 pthread_mutex_lock(&rate_mutex);
1182 for (rcpt_rates::iterator i=rcpt_counts.begin(); i!=rcpt_counts.end(); i++) { 1182 for (rcpt_rates::iterator i=rcpt_counts.begin(); i!=rcpt_counts.end(); i++) {
1183 char *x = (*i).first; 1183 (*i).second = 0;
1184 free(x); 1184 }
1185 }
1186 rcpt_counts.clear();
1187 pthread_mutex_unlock(&rate_mutex); 1185 pthread_mutex_unlock(&rate_mutex);
1188 loop = 0; 1186 loop = 0;
1189 } 1187 }
1190 CONFIG &dc = *config; 1188 CONFIG &dc = *config;
1191 time_t then = dc.load_time; 1189 time_t then = dc.load_time;