Cleanup mttest.c : because we no longer use stdio here, don't include it
[openssl.git] / crypto / threads / mttest.c
index 0ad8d0fe1832e4c19ebe7c3ae7d64eae6b92c763..914ba7bb6fb5e1edce778f7232f96e4e1ed3b555 100644 (file)
@@ -56,7 +56,6 @@
  * [including the GNU Public Licence.]
  */
 
-#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
@@ -276,9 +275,12 @@ int main(int argc, char *argv[])
                                    SSL_SESS_CACHE_SERVER);
 
     if (!SSL_CTX_use_certificate_file(s_ctx, scert, SSL_FILETYPE_PEM)) {
+        BIO_printf(bio_err, "SSL_CTX_use_certificate_file (%s)\n", scert);
         ERR_print_errors(bio_err);
+        goto end;
     } else
         if (!SSL_CTX_use_RSAPrivateKey_file(s_ctx, scert, SSL_FILETYPE_PEM)) {
+        BIO_printf(bio_err, "SSL_CTX_use_RSAPrivateKey_file (%s)\n", scert);
         ERR_print_errors(bio_err);
         goto end;
     }
@@ -591,6 +593,7 @@ int doit(char *ctx[4])
     SSL_set_shutdown(s_ssl, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN);
 
  err:
+#if 0
     /*
      * We have to set the BIO's to NULL otherwise they will be free()ed
      * twice.  Once when th s_ssl is SSL_free()ed and again when c_ssl is
@@ -612,6 +615,7 @@ int doit(char *ctx[4])
     /* The SSL's are optionally freed in the following calls */
     BIO_free(c_to_s);
     BIO_free(s_to_c);
+#endif
 
     BIO_free(c_bio);
     BIO_free(s_bio);
@@ -800,8 +804,12 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX *c_ctx)
         thr_join(thread_ctx[i], NULL, NULL);
     }
 
+#if 0 /* We can't currently find out the reference amount */
     BIO_printf(bio_stdout, "solaris threads done (%d,%d)\n",
                s_ctx->references, c_ctx->references);
+#else
+    BIO_printf(bio_stdout, "solaris threads done\n");
+#endif
 }
 
 void solaris_thread_id(CRYPTO_THREADID *tid)
@@ -884,8 +892,12 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX *c_ctx)
         wait(NULL);
     }
 
+#if 0 /* We can't currently find out the reference amount */
     BIO_printf(bio_stdout, "irix threads done (%d,%d)\n",
                s_ctx->references, c_ctx->references);
+#else
+    BIO_printf(bio_stdout, "irix threads done\n");
+#endif
 }
 
 unsigned long irix_thread_id(void)
@@ -962,8 +974,12 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX *c_ctx)
         pthread_join(thread_ctx[i], NULL);
     }
 
+#if 0 /* We can't currently find out the reference amount */
     BIO_printf(bio_stdout, "pthreads threads done (%d,%d)\n",
                s_ctx->references, c_ctx->references);
+#else
+    BIO_printf(bio_stdout, "pthreads threads done\n");
+#endif
 }
 
 void pthreads_thread_id(CRYPTO_THREADID *tid)
@@ -1040,8 +1056,12 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX *c_ctx)
     for (i = 0; i < thread_number; i++) {
         MPKSemaphoreWait(ThreadSem);
     }
+#if 0 /* We can't currently find out the reference amount */
     BIO_printf(bio_stdout, "netware threads done (%d,%d)\n",
                s_ctx->references, c_ctx->references);
+#else
+    BIO_printf(bio_stdout, "netware threads done\n");
+#endif
 }
 
 unsigned long netware_thread_id(void)