apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r1308135 - in /apr/apr-util/branches/1.4.x: ./ CHANGES crypto/apr_crypto.c
Date Sun, 01 Apr 2012 15:23:45 GMT
Author: minfrin
Date: Sun Apr  1 15:23:45 2012
New Revision: 1308135

URL: http://svn.apache.org/viewvc?rev=1308135&view=rev
Log:
Backport:
apr_crypto: Ensure the *driver variable is initialised when a statically
compiled library is initialised for the first time.

Modified:
    apr/apr-util/branches/1.4.x/   (props changed)
    apr/apr-util/branches/1.4.x/CHANGES
    apr/apr-util/branches/1.4.x/crypto/apr_crypto.c

Propchange: apr/apr-util/branches/1.4.x/
------------------------------------------------------------------------------
  Merged /apr/apr/trunk:r1308131

Modified: apr/apr-util/branches/1.4.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.4.x/CHANGES?rev=1308135&r1=1308134&r2=1308135&view=diff
==============================================================================
--- apr/apr-util/branches/1.4.x/CHANGES [utf-8] (original)
+++ apr/apr-util/branches/1.4.x/CHANGES [utf-8] Sun Apr  1 15:23:45 2012
@@ -1,6 +1,9 @@
                                                      -*- coding: utf-8 -*-
 Changes with APR-util 1.4.3
 
+  *) apr_crypto: Ensure the *driver variable is initialised when a statically
+     compiled library is initialised for the first time. [Graham Leggett]
+
   *) apr_crypto: Ensure the *driver variable is initialised when the library
      has already been loaded. Fix ported from apr_dbd. [Graham Leggett]
 

Modified: apr/apr-util/branches/1.4.x/crypto/apr_crypto.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.4.x/crypto/apr_crypto.c?rev=1308135&r1=1308134&r2=1308135&view=diff
==============================================================================
--- apr/apr-util/branches/1.4.x/crypto/apr_crypto.c (original)
+++ apr/apr-util/branches/1.4.x/crypto/apr_crypto.c Sun Apr  1 15:23:45 2012
@@ -68,13 +68,14 @@ typedef struct apr_crypto_clear_t {
 } apr_crypto_clear_t;
 
 #if !APU_DSO_BUILD
-#define DRIVER_LOAD(name,driver,pool,params,rv,result) \
+#define DRIVER_LOAD(name,driver_name,pool,params,rv,result) \
     {   \
-        extern const apr_crypto_driver_t driver; \
-        apr_hash_set(drivers,name,APR_HASH_KEY_STRING,&driver); \
-        if (driver.init) {     \
-            rv = driver.init(pool, params, result); \
+        extern const apr_crypto_driver_t driver_name; \
+        apr_hash_set(drivers,name,APR_HASH_KEY_STRING,&driver_name); \
+        if (driver_name.init) {     \
+            rv = driver_name.init(pool, params, result); \
         }  \
+        *driver = &driver_name; \
     }
 #endif
 



Mime
View raw message