mlmmj

changeset 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 diff
     1.1 --- a/ChangeLog	Fri Nov 12 00:53:36 2010 +1100
     1.2 +++ b/ChangeLog	Fri Nov 12 02:26:49 2010 +1100
     1.3 @@ -1,3 +1,5 @@
     1.4 + o Avoid checking addresses multiple times for notmetoo and make it work even
     1.5 +   when delivering messages individually
     1.6   o Fixed small memory leaks when SMTP errors occur
     1.7   o Improved error logging when requeuing
     1.8   o Fix php-admin to work when topdir contains a symlink (e.g. on Mac)
     2.1 --- a/src/mlmmj-send.c	Fri Nov 12 00:53:36 2010 +1100
     2.2 +++ b/src/mlmmj-send.c	Fri Nov 12 02:26:49 2010 +1100
     2.3 @@ -1189,10 +1189,11 @@
     2.4  				continue;
     2.5  			}
     2.6  			do {
     2.7 +				i = stl.count;
     2.8  				res = getaddrsfromfd(&stl, subfd,
     2.9  						maxverprecips);
    2.10 -				if(omit != NULL && maxverprecips > 1) {
    2.11 -					for(i = 0; i < stl.count; i++) {
    2.12 +				if(omit != NULL) {
    2.13 +					while(i < stl.count) {
    2.14  						if(strcmp(stl.strs[i], omit)
    2.15  							== 0) {
    2.16  						    myfree(stl.strs[i]);
    2.17 @@ -1205,6 +1206,7 @@
    2.18  						    stl.strs[stl.count] = NULL;
    2.19  						    break;
    2.20  						}
    2.21 +						i++;
    2.22  					}
    2.23  				}
    2.24  				if(stl.count == maxverprecips) {