VC-32.pl: bufferoverlowu.lib only when needed and remove duplicate code
[openssl.git] / crypto / bio / bio_err.c
index 8859a58ae4f6c253b71eaf83fb54891c9169f3c2..a224edd5a0a77a49d638e913fddc4b26b75dedbc 100644 (file)
@@ -1,6 +1,6 @@
 /* crypto/bio/bio_err.c */
 /* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project.  All rights reserved.
+ * Copyright (c) 1999-2006 The OpenSSL Project.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -73,6 +73,7 @@ static ERR_STRING_DATA BIO_str_functs[]=
 {ERR_FUNC(BIO_F_ACPT_STATE),   "ACPT_STATE"},
 {ERR_FUNC(BIO_F_BIO_ACCEPT),   "BIO_accept"},
 {ERR_FUNC(BIO_F_BIO_BER_GET_HEADER),   "BIO_BER_GET_HEADER"},
+{ERR_FUNC(BIO_F_BIO_CALLBACK_CTRL),    "BIO_callback_ctrl"},
 {ERR_FUNC(BIO_F_BIO_CTRL),     "BIO_ctrl"},
 {ERR_FUNC(BIO_F_BIO_GETHOSTBYNAME),    "BIO_gethostbyname"},
 {ERR_FUNC(BIO_F_BIO_GETS),     "BIO_gets"},
@@ -142,15 +143,12 @@ static ERR_STRING_DATA BIO_str_reasons[]=
 
 void ERR_load_BIO_strings(void)
        {
-       static int init=1;
+#ifndef OPENSSL_NO_ERR
 
-       if (init)
+       if (ERR_func_error_string(BIO_str_functs[0].error) == NULL)
                {
-               init=0;
-#ifndef OPENSSL_NO_ERR
                ERR_load_strings(0,BIO_str_functs);
                ERR_load_strings(0,BIO_str_reasons);
-#endif
-
                }
+#endif
        }