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 73FBA9DFB for ; Sun, 1 Apr 2012 15:18:40 +0000 (UTC) Received: (qmail 99505 invoked by uid 500); 1 Apr 2012 15:18:40 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 99471 invoked by uid 500); 1 Apr 2012 15:18:40 -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 99463 invoked by uid 99); 1 Apr 2012 15:18:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Apr 2012 15:18:40 +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:18:39 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 4212123888EA for ; Sun, 1 Apr 2012 15:18:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1308132 - in /apr/apr-util/branches/1.5.x: ./ crypto/apr_crypto.c Date: Sun, 01 Apr 2012 15:18:19 -0000 To: commits@apr.apache.org From: minfrin@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120401151819.4212123888EA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: minfrin Date: Sun Apr 1 15:18:18 2012 New Revision: 1308132 URL: http://svn.apache.org/viewvc?rev=1308132&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.5.x/ (props changed) apr/apr-util/branches/1.5.x/crypto/apr_crypto.c Propchange: apr/apr-util/branches/1.5.x/ ------------------------------------------------------------------------------ Merged /apr/apr/trunk:r1308131 Modified: apr/apr-util/branches/1.5.x/crypto/apr_crypto.c URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.5.x/crypto/apr_crypto.c?rev=1308132&r1=1308131&r2=1308132&view=diff ============================================================================== --- apr/apr-util/branches/1.5.x/crypto/apr_crypto.c (original) +++ apr/apr-util/branches/1.5.x/crypto/apr_crypto.c Sun Apr 1 15:18:18 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