tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Re: mod_jk 1.2.28 on i5/OS
Date Wed, 13 May 2009 13:35:48 GMT
Gimme a few minutes, there's something non i5-specific wrong with the
patch ...

On 13.05.2009 14:56, Henri Gomez wrote:
> Some comments on your latest provided patch :
> 
>        if (!jk_resolv_pool) {
>             if (apr_pool_create(&jk_resolv_pool, (apr_pool_t *)pool)
> != APR_SUCCESS) {
>                 JK_TRACE_EXIT(l);
>                 return JK_FALSE;
>             }
>         }
>         /* We need to clear the pool reference, if the pool gets destroyed
>                         * via its parent pool. */
>         apr_pool_cleanup_register(jk_resolv_pool, &jk_resolv_pool,
> jk_resolv_cleanup, jk_resolv_cleanup);
>         apr_pool_clear(jk_resolv_pool);
>         if (apr_sockaddr_info_get
>             (&remote_sa, host, APR_UNSPEC, (apr_port_t) port, 0, jk_resolv_pool)
>             != APR_SUCCESS) {
>             JK_TRACE_EXIT(l);
>             return JK_FALSE;
>         }
> 
> Why not just add the cleanup register in pool create side ?
> 
>        if (!jk_resolv_pool) {
>             if (apr_pool_create(&jk_resolv_pool, (apr_pool_t *)pool)
> != APR_SUCCESS) {
>                 JK_TRACE_EXIT(l);
>                 return JK_FALSE;
>             }
> 
>         /* We need to clear the pool reference, if the pool gets destroyed
>                         * via its parent pool. */
>         apr_pool_cleanup_register(jk_resolv_pool, &jk_resolv_pool,
> jk_resolv_cleanup, jk_resolv_cleanup);
>         }
> 
>         apr_pool_clear(jk_resolv_pool);
>         if (apr_sockaddr_info_get
>             (&remote_sa, host, APR_UNSPEC, (apr_port_t) port, 0, jk_resolv_pool)
>             != APR_SUCCESS) {
>             JK_TRACE_EXIT(l);
>             return JK_FALSE;
>         }
> 
> 
> Also what could happen if we get many threads calling jk_resolv at the
> same time ?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message