diff cinst/windowsstore.c @ 626:f595fcbe3e76

Replace "normal printfs" with DEBUG / ERROR printf macros
author Andre Heinecke <andre.heinecke@intevation.de>
date Fri, 20 Jun 2014 14:29:05 +0200
parents 736e95c63b86
children 698b6a9bd75e
line wrap: on
line diff
--- a/cinst/windowsstore.c	Fri Jun 20 12:53:16 2014 +0200
+++ b/cinst/windowsstore.c	Fri Jun 20 14:29:05 2014 +0200
@@ -28,7 +28,7 @@
 
   if (ret != 0)
     {
-      printf ("decoding certificate failed\n");
+      ERRORPRINTF ("decoding certificate failed\n");
       return NULL;
     }
 
@@ -45,7 +45,7 @@
       char *error = getLastErrorMsg();
       if (error)
         {
-          printf ("Failed to create cert context: %s \n", error);
+          ERRORPRINTF ("Failed to create cert context: %s \n", error);
           free (error);
         }
       return NULL;
@@ -77,7 +77,7 @@
           char *error = getLastErrorMsg();
           if (error)
             {
-              printf ("Failed to create cert context: %s \n", error);
+              ERRORPRINTF ("Failed to create cert context: %s \n", error);
               free (error);
             }
           continue;
@@ -94,7 +94,7 @@
 
       if (pCert == NULL)
         {
-          printf ("Did not find certificate\n");
+          ERRORPRINTF ("Did not find certificate\n");
           continue;
         }
 
@@ -105,7 +105,7 @@
              pCertContext by calling the CertFreeCertificateContext
              function, even if an error is encountered. */
           char *error = getLastErrorMsg();
-          printf ("Error deleting certificate. %s", error);
+          ERRORPRINTF ("Error deleting certificate. %s", error);
           free (error);
           continue;
         }
@@ -148,7 +148,7 @@
                                                NULL);
       if (found_cert != NULL)
         {
-          printf ("Certificate already in store\n");
+          DEBUGPRINTF ("Certificate already in store\n");
           CertFreeCertificateContext (found_cert);
           CertFreeCertificateContext (pc_to_add);
           continue;
@@ -164,7 +164,7 @@
           char *error = getLastErrorMsg();
           if (error)
             {
-              printf ("Failed to add certificate: %s \n", error);
+              ERRORPRINTF ("Failed to add certificate: %s \n", error);
               free (error);
             }
         }

http://wald.intevation.org/projects/trustbridge/