changeset 774:62f9b36df5a5

Avoid checking addresses multiple times for notmetoo
author Ben Schmidt
date Fri, 12 Nov 2010 02:26:49 +1100
parents 2add5c5f88f8
children d0bf2135ab34
files ChangeLog src/mlmmj-send.c
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Nov 12 00:53:36 2010 +1100
+++ b/ChangeLog	Fri Nov 12 02:26:49 2010 +1100
@@ -1,3 +1,5 @@
+ o Avoid checking addresses multiple times for notmetoo and make it work even
+   when delivering messages individually
  o Fixed small memory leaks when SMTP errors occur
  o Improved error logging when requeuing
  o Fix php-admin to work when topdir contains a symlink (e.g. on Mac)
--- a/src/mlmmj-send.c	Fri Nov 12 00:53:36 2010 +1100
+++ b/src/mlmmj-send.c	Fri Nov 12 02:26:49 2010 +1100
@@ -1189,10 +1189,11 @@
 				continue;
 			}
 			do {
+				i = stl.count;
 				res = getaddrsfromfd(&stl, subfd,
 						maxverprecips);
-				if(omit != NULL && maxverprecips > 1) {
-					for(i = 0; i < stl.count; i++) {
+				if(omit != NULL) {
+					while(i < stl.count) {
 						if(strcmp(stl.strs[i], omit)
 							== 0) {
 						    myfree(stl.strs[i]);
@@ -1205,6 +1206,7 @@
 						    stl.strs[stl.count] = NULL;
 						    break;
 						}
+						i++;
 					}
 				}
 				if(stl.count == maxverprecips) {