Update all copyright messages to cover 1995 - 2009. Remove tab from exim_checkaccess.src
[exim.git] / src / src / header.c
index a9d8e599c1e7066541cd6619e3b135cb04133ce1..1b6bf56d1d2eba734c1f217b456a8205090f5bc3 100644 (file)
@@ -1,10 +1,10 @@
-/* $Cambridge: exim/src/src/header.c,v 1.2 2004/12/16 15:11:47 tom Exp $ */
+/* $Cambridge: exim/src/src/header.c,v 1.8 2009/11/16 19:50:37 nm4 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) University of Cambridge 1995 - 2004 */
+/* Copyright (c) University of Cambridge 1995 - 2009 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 
@@ -48,7 +48,6 @@ return *tt == ':';
 BOOL
 header_testname_incomplete(header_line *h, uschar *name, int len, BOOL notdel)
 {
-uschar *tt;
 if (h->type == '*' && notdel) return FALSE;
 if (h->text == NULL || strncmpic(h->text, name, len) != 0) return FALSE;
 return TRUE;
@@ -119,7 +118,14 @@ if (name == NULL)
   else
     {
     hptr = &header_list;
-    h = header_list;
+
+    /* header_list->text can be NULL if we get here between when the new
+    received header is allocated and when it is acutally filled in. We want
+    that header to be first, so skip it for now. */
+
+    if (header_list->text == NULL)
+      hptr = &header_list->next;
+    h = *hptr;
     }
   }