You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ma...@apache.org on 2008/07/27 17:41:04 UTC
svn commit: r680133 -
/webservices/axis2/trunk/c/src/core/transport/http/server/apache2/mod_axis2.c
Author: manjula
Date: Sun Jul 27 08:41:03 2008
New Revision: 680133
URL: http://svn.apache.org/viewvc?rev=680133&view=rev
Log:
Switching back to apache request pool.
Modified:
webservices/axis2/trunk/c/src/core/transport/http/server/apache2/mod_axis2.c
Modified: webservices/axis2/trunk/c/src/core/transport/http/server/apache2/mod_axis2.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/transport/http/server/apache2/mod_axis2.c?rev=680133&r1=680132&r2=680133&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/transport/http/server/apache2/mod_axis2.c (original)
+++ webservices/axis2/trunk/c/src/core/transport/http/server/apache2/mod_axis2.c Sun Jul 27 08:41:03 2008
@@ -105,10 +105,6 @@
axutil_allocator_t * allocator,
void *ptr);
-void AXIS2_CALL
-axis2_module_pool_allocator_destroy(
- axutil_allocator_t *allocator);
-
static void axis2_module_init(
apr_pool_t * p,
server_rec * svr_rec);
@@ -323,11 +319,6 @@
axutil_env_t *thread_env = NULL;
axutil_allocator_t *allocator = NULL;
axutil_error_t *error = NULL;
- apr_allocator_t *local_allocator = NULL;
- apr_pool_t *local_pool = NULL;
-
- apr_allocator_create(&local_allocator);
- apr_pool_create_ex(&local_pool, NULL, NULL, local_allocator);
if (strcmp(req->handler, "axis2_module"))
{
@@ -347,7 +338,7 @@
rv = AXIS2_APACHE2_WORKER_PROCESS_REQUEST(axis2_worker, axutil_env, req);*/
/* create new allocator for this request */
- allocator = (axutil_allocator_t *) apr_palloc(local_pool,
+ allocator = (axutil_allocator_t *) apr_palloc(req->pool,
sizeof(axutil_allocator_t));
if (!allocator)
{
@@ -356,12 +347,9 @@
allocator->malloc_fn = axis2_module_malloc;
allocator->realloc = axis2_module_realloc;
allocator->free_fn = axis2_module_free;
- allocator->local_pool = (void *) local_pool;
- allocator->current_pool = (void *) local_pool;
+ allocator->local_pool = (void *)req->pool ;
+ allocator->current_pool = (void *)req->pool;
allocator->global_pool = axutil_env->allocator->global_pool;
- allocator->pool_allocator_destroy = axis2_module_pool_allocator_destroy;
- allocator->pool_allocator = local_allocator;
- allocator->ref_pool_allocator = 1;
error = axutil_error_create(allocator);
thread_env = axutil_env_create_with_error_log_thread_pool(allocator,
@@ -376,11 +364,6 @@
return HTTP_INTERNAL_SERVER_ERROR;
}
- axis2_module_pool_allocator_destroy(allocator);
-
- /*apr_pool_destroy(local_pool);
- apr_allocator_destroy(local_allocator);*/
-
return rv;
}
@@ -446,18 +429,6 @@
#endif
}
-void AXIS2_CALL
-axis2_module_pool_allocator_destroy(
- axutil_allocator_t *allocator)
-{
- if((--(allocator->ref_pool_allocator)) == 0)
- {
- apr_pool_destroy(allocator->local_pool);
- apr_allocator_destroy(allocator->pool_allocator);
- }
-}
-
-
static int axis2_post_config(apr_pool_t *pconf, apr_pool_t *plog,
apr_pool_t *ptemp, server_rec *svr_rec)
{