apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r597924 - in /apr/apr-util/trunk/ssl: apr_ssl.c apr_ssl_openssl.c apr_ssl_winsock.c
Date Sat, 24 Nov 2007 22:08:18 GMT
Author: minfrin
Date: Sat Nov 24 14:08:17 2007
New Revision: 597924

URL: http://svn.apache.org/viewvc?rev=597924&view=rev
Log:
Make the initialisation consistent with apr_ssl_factory_create(), fix
missing symbol for apu_ssl_init.

Modified:
    apr/apr-util/trunk/ssl/apr_ssl.c
    apr/apr-util/trunk/ssl/apr_ssl_openssl.c
    apr/apr-util/trunk/ssl/apr_ssl_winsock.c

Modified: apr/apr-util/trunk/ssl/apr_ssl.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/ssl/apr_ssl.c?rev=597924&r1=597923&r2=597924&view=diff
==============================================================================
--- apr/apr-util/trunk/ssl/apr_ssl.c (original)
+++ apr/apr-util/trunk/ssl/apr_ssl.c Sat Nov 24 14:08:17 2007
@@ -35,6 +35,19 @@
 
 static int sslInit = 0;
 
+APU_DECLARE(apr_status_t) apr_ssl_init(void)
+{
+    if (!sslInit) {
+        apr_status_t rv = apu_ssl_init();
+        if (APR_SUCCESS == rv) {
+            sslInit = 1;
+        }
+        return rv;
+    }
+
+    return APR_SUCCESS;
+}
+
 APU_DECLARE(apr_status_t) apr_ssl_factory_create(apr_ssl_factory_t ** fact,
                                                  const char *privateKeyFn,
                                                  const char *certFn,
@@ -53,9 +66,10 @@
         return ENOMEM;
 
     if (!sslInit) {
-        if (apu_ssl_init() != APR_SUCCESS)
-            return APR_EGENERAL;/* ?? error code ?? */
-        sslInit = 1;
+        rv = apr_ssl_init();
+        if (APR_SUCCESS != rv) {
+            return rv;
+        }
     }
 
     *fact = NULL;
@@ -76,6 +90,11 @@
 }
 
 #else                                /* ! APU_HAVE_SSL */
+
+APU_DECLARE(apr_status_t) apr_ssl_init(void)
+{
+    return APR_ENOTIMPL;
+}
 
 APU_DECLARE(apr_status_t) apr_ssl_factory_create(apr_ssl_factory_t ** fact,
                                                  const char *privateKeyFn,

Modified: apr/apr-util/trunk/ssl/apr_ssl_openssl.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/ssl/apr_ssl_openssl.c?rev=597924&r1=597923&r2=597924&view=diff
==============================================================================
--- apr/apr-util/trunk/ssl/apr_ssl_openssl.c (original)
+++ apr/apr-util/trunk/ssl/apr_ssl_openssl.c Sat Nov 24 14:08:17 2007
@@ -35,7 +35,7 @@
 #include "apr_ssl_private.h"
 #include "apr_ssl_openssl_private.h"
 
-APU_DECLARE(apr_status_t) apr_ssl_init(void)
+APU_DECLARE(apr_status_t) apu_ssl_init(void)
 {
     CRYPTO_malloc_init();
     SSL_load_error_strings();

Modified: apr/apr-util/trunk/ssl/apr_ssl_winsock.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/ssl/apr_ssl_winsock.c?rev=597924&r1=597923&r2=597924&view=diff
==============================================================================
--- apr/apr-util/trunk/ssl/apr_ssl_winsock.c (original)
+++ apr/apr-util/trunk/ssl/apr_ssl_winsock.c Sat Nov 24 14:08:17 2007
@@ -35,7 +35,7 @@
 #include "apr_ssl_private.h"
 #include "apr_ssl_winsock_private.h"
 
-APU_DECLARE(apr_status_t) apr_ssl_init(void)
+APU_DECLARE(apr_status_t) apu_ssl_init(void)
 {
     return APR_SUCCESS;
 }



Mime
View raw message