[exim-cvs] cvs commit: exim/exim-src/src dk.c

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Tom Kistner
Ημερομηνία:  
Προς: exim-cvs
Αντικείμενο: [exim-cvs] cvs commit: exim/exim-src/src dk.c
tom 2005/06/27 16:12:00 BST

  Modified files:
    exim-src/src         dk.c 
  Log:
  Implement "testing" flag lookup logic


  Revision  Changes    Path
  1.6       +11 -3     exim/exim-src/src/dk.c


  Index: dk.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/dk.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- dk.c    27 Jun 2005 14:29:43 -0000    1.5
  +++ dk.c    27 Jun 2005 15:11:59 -0000    1.6
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/dk.c,v 1.5 2005/06/27 14:29:43 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/dk.c,v 1.6 2005/06/27 15:11:59 tom Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -138,6 +138,13 @@
     /* Flag end-of-message. */
     dk_internal_status = dk_end(dk_context, &dk_flags);


  +  /* dk_flags now has the selector flags (if there was one).
  +     It seems that currently only the "t=" flag is supported
  +     in selectors. */
  +  if (dk_flags & DK_FLAG_SET)
  +    if (dk_flags & DK_FLAG_TESTING)
  +      dk_verify_block->testing = TRUE;
  +
     /* Grab address/domain information. */
     p = dk_address(dk_context);
     if (p != NULL) {
  @@ -165,12 +172,13 @@
       }
     }


  -  /* TODO: This call should be removed with lib version >= 0.67 */
  +  /* Now grab the domain-wide DK policy */
     dk_flags = dk_policy(dk_context);


  -  /* Grab domain policy */
     if (dk_flags & DK_FLAG_SET) {
  -    if (dk_flags & DK_FLAG_TESTING)
  +    /* Selector "t=" flag has precedence, don't overwrite it if
  +       the selector has set it above. */
  +    if ((dk_flags & DK_FLAG_TESTING) && !dk_verify_block->testing)
         dk_verify_block->testing = TRUE;
       if (dk_flags & DK_FLAG_SIGNSALL)
         dk_verify_block->signsall = TRUE;