Return-Path: X-Original-To: apmail-apr-commits-archive@www.apache.org Delivered-To: apmail-apr-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 404989F68 for ; Sun, 1 Apr 2012 15:24:09 +0000 (UTC) Received: (qmail 8954 invoked by uid 500); 1 Apr 2012 15:24:09 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 8912 invoked by uid 500); 1 Apr 2012 15:24:09 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 8905 invoked by uid 99); 1 Apr 2012 15:24:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Apr 2012 15:24:09 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Apr 2012 15:24:06 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id D155F238897A for ; Sun, 1 Apr 2012 15:23:45 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@apr.apache.org From: minfrin@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120401152345.D155F238897A@eris.apache.org> 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