apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 41807] - dbd driver registration function
Date Sat, 10 Mar 2007 21:49:20 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41807>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41807





------- Additional Comments From Tom.Donovan@acm.org  2007-03-10 13:49 -------
After a bit of testing, I found I forgot to lock the mutex and init the driver.
Apologies for posting the enhancement request too quickly.

APU_DECLARE(apr_status_t) apr_dbd_set_driver(apr_pool_t *pool, const char *name,
                                             const apr_dbd_driver_t *driver)
{
    apr_dbd_driver_t *prev = apr_hash_get(drivers, name, APR_HASH_KEY_STRING);
    if (prev && (prev != driver)) {
        return APR_EGENERAL;
    }
    dbd_drivers_lock(mutex);
    if (driver->init) {
        driver->init(pool);
    }
    apr_hash_set(drivers, name, APR_HASH_KEY_STRING, driver);
    dbd_drivers_unlock(mutex);
    return APR_SUCCESS;
}


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message