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

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Tom Kistner
日付:  
To: exim-cvs
題目: [exim-cvs] cvs commit: exim/exim-src/src/pdkim pdkim.c
tom 2009/04/09 20:07:18 BST

  Modified files:        (Branch: DEVEL_PDKIM)
    exim-src/src/pdkim   pdkim.c 
  Log:
  Fix unarmored debug output


  Revision  Changes    Path
  1.1.2.11  +10 -2     exim/exim-src/src/pdkim/pdkim.c


  Index: pdkim.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/pdkim/Attic/pdkim.c,v
  retrieving revision 1.1.2.10
  retrieving revision 1.1.2.11
  diff -u -r1.1.2.10 -r1.1.2.11
  --- pdkim.c    9 Apr 2009 14:47:50 -0000    1.1.2.10
  +++ pdkim.c    9 Apr 2009 19:07:18 -0000    1.1.2.11
  @@ -20,7 +20,7 @@
    *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
    */


-/* $Cambridge: exim/exim-src/src/pdkim/pdkim.c,v 1.1.2.10 2009/04/09 14:47:50 tom Exp $ */
+/* $Cambridge: exim/exim-src/src/pdkim/pdkim.c,v 1.1.2.11 2009/04/09 19:07:18 tom Exp $ */

   #include <stdlib.h>
   #include <stdio.h>
  @@ -1371,13 +1371,21 @@
       if (sig->algo == PDKIM_ALGO_RSA_SHA1) {
         sha1_update(&(sha1_headers),(unsigned char *)sig_hdr,strlen(sig_hdr));
         sha1_finish(&(sha1_headers),(unsigned char *)headerhash);
  -      fprintf(ctx->debug_stream, "PDKIM [%s] hh computed: ", sig->domain);
  +      #ifdef PDKIM_DEBUG
  +      if (ctx->debug_stream) {
  +        fprintf(ctx->debug_stream, "PDKIM [%s] hh computed: ", sig->domain);
  +      }
  +      #endif
         pdkim_hexprint(ctx->debug_stream, headerhash, 20, 1);
       }
       else {
         sha2_update(&(sha2_headers),(unsigned char *)sig_hdr,strlen(sig_hdr));
         sha2_finish(&(sha2_headers),(unsigned char *)headerhash);
  -      fprintf(ctx->debug_stream, "PDKIM [%s] hh computed: ", sig->domain);
  +      #ifdef PDKIM_DEBUG
  +      if (ctx->debug_stream) {
  +        fprintf(ctx->debug_stream, "PDKIM [%s] hh computed: ", sig->domain);
  +      }
  +      #endif
         pdkim_hexprint(ctx->debug_stream, headerhash, 32, 1);
       }