[exim-cvs] Don't use match_isinlist() for simple string list…

Página Inicial
Delete this message
Reply to this message
Autor: Exim Git Commits Mailing List
Data:  
Para: exim-cvs
Assunto: [exim-cvs] Don't use match_isinlist() for simple string list matching
Gitweb: http://git.exim.org/exim.git/commitdiff/ae9094bfe313aeb9ffefc7566bd4dae49ada3cf5
Commit:     ae9094bfe313aeb9ffefc7566bd4dae49ada3cf5
Parent:     337e3505b0e6cd4309db6bf6062b33fa56e06cf8
Author:     Tom Kistner <tom@???>
AuthorDate: Sun May 8 09:58:12 2011 +0100
Committer:  Tom Kistner <tom@???>
CommitDate: Sun May 8 09:58:12 2011 +0100


    Don't use match_isinlist() for simple string list matching
---
 src/src/receive.c |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)


diff --git a/src/src/receive.c b/src/src/receive.c
index 914b1d2..f331d2a 100644
--- a/src/src/receive.c
+++ b/src/src/receive.c
@@ -3022,14 +3022,29 @@ else
                appears in the expanded list. */
             if (seen_items != NULL)
               {
+              uschar *seen_item = NULL;
+              uschar seen_item_buf[256];
               uschar *seen_items_list = seen_items;
-              if (match_isinlist(item,
-                    &seen_items_list,0,NULL,NULL,MCL_STRING,TRUE,NULL) == OK)
+              int seen_this_item = 0;
+              
+              while ((seen_item = string_nextinlist(&seen_items_list, &sep,
+                                                    seen_item_buf,
+                                                    sizeof(seen_item_buf))) != NULL)
+                {
+                  if (Ustrcmp(seen_item,item) == 0)
+                    {
+                      seen_this_item = 1;
+                      break;
+                    } 
+                }
+
+              if (seen_this_item > 0)
                 {
                 DEBUG(D_receive)
                   debug_printf("acl_smtp_dkim: skipping signer %s, already seen\n", item);
                 continue;
                 }
+              
               seen_items = string_append(seen_items,&seen_items_size,&seen_items_offset,1,":");
               }