apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From NormW <no...@gknw.net>
Subject Re: apr, pools and NetWare
Date Thu, 28 Jul 2011 03:30:20 GMT
Hi,
The attached patch is one possible solution for apr_dbd/dbm.c where this 
can occur with the present apr configuration.
The same for() loop can be found in apr_crypto.c and apr_dso.c, but as 
these files are (atm) not included in the NetWare apr build, there is no 
change to these files proposed here.
Regards,
Norm

> Hi,
> Raised this some months ago but response was left than deafening, and
> advice says 'have another go', so...
>
> In apr\memory\unix\apr_pools.c:
>
>> APR_DECLARE(apr_pool_t *) apr_pool_parent_get(apr_pool_t *pool)
>> {
>> #ifdef NETWARE
>> /* On NetWare, don't return the global_pool, return the application pool
>> as the top most pool */
>> if (pool->parent == global_pool)
>> return pool;
>> else
>> #endif
>> return pool->parent;
>> }
>
> in apr\dbd\apr_dbd.c:
>
>> for (parent = pool; parent; parent = apr_pool_parent_get(pool))
>> pool = parent;
>
> Cannot see how NetWare can escape this loop if apr_pool_parent_get()
> returns the same pool passed in to the function.
>
> Either (in NetWare case):
>
> - apr_pool_parent_get() has to return something other than the same
> 'pool' to allow the loop to exit, OR
>
> - the loop needs to determine if it got the same pool back (at least in
> NetWare case) and exit the loop.
>
> Comments please.
> Regards,
> Norm
>
>


Mime
View raw message