You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2006/09/21 10:45:34 UTC
svn commit: r448495 - in /webservices/axis2/trunk/c: include/axis2_op.h
modules/core/deployment/module_builder.c
modules/core/description/module_desc.c modules/core/description/op.c
modules/core/description/svc.c modules/core/engine/conf.c
Author: samisa
Date: Thu Sep 21 01:45:33 2006
New Revision: 448495
URL: http://svn.apache.org/viewvc?view=rev&rev=448495
Log:
Fixed the problem of segfault with sandesha engaged.
Fix for AXIS2C-301
Modified:
webservices/axis2/trunk/c/include/axis2_op.h
webservices/axis2/trunk/c/modules/core/deployment/module_builder.c
webservices/axis2/trunk/c/modules/core/description/module_desc.c
webservices/axis2/trunk/c/modules/core/description/op.c
webservices/axis2/trunk/c/modules/core/description/svc.c
webservices/axis2/trunk/c/modules/core/engine/conf.c
Modified: webservices/axis2/trunk/c/include/axis2_op.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_op.h?view=diff&rev=448495&r1=448494&r2=448495
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_op.h (original)
+++ webservices/axis2/trunk/c/include/axis2_op.h Thu Sep 21 01:45:33 2006
@@ -775,6 +775,16 @@
const axis2_char_t *label,
const struct axis2_msg *msg);
+ /**
+ * Checks if the operation is from a module.
+ * @param op pointer to operation
+ * @param env pointer to environment struct
+ * AXIS2_TRUE if the operation is from a module, else AXIS2_FALSE
+ */
+ axis2_bool_t (AXIS2_CALL *
+ is_from_module)(
+ const axis2_op_t *op,
+ const axis2_env_t *env);
};
/**
@@ -800,6 +810,15 @@
const axis2_env_t *env);
/**
+ * Creates operation struct for an operation defined in a module.
+ * @param env pointer to environment struct
+ * @return pointer to newly created operation
+ */
+ AXIS2_EXTERN axis2_op_t *AXIS2_CALL
+ axis2_op_create_from_module(
+ const axis2_env_t *env);
+
+ /**
* Creates operation struct with given QName.
* @param env pointer to environment struct
* @param name pointer to QName
@@ -1085,6 +1104,11 @@
@sa axis2_op_ops#add_msg */
#define AXIS2_OP_ADD_MSG(op, env, label, msg) \
((op)->ops->add_msg(op, env, label, msg))
+
+/** Checks is the operation is from a module.
+ @sa axis2_op_ops#is_from_module */
+#define AXIS2_OP_IS_FROM_MODULE(op, env) \
+ ((op)->ops->is_from_module(op, env))
/** @} */
#ifdef __cplusplus
Modified: webservices/axis2/trunk/c/modules/core/deployment/module_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/deployment/module_builder.c?view=diff&rev=448495&r1=448494&r2=448495
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/module_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/module_builder.c Thu Sep 21 01:45:33 2006
@@ -464,14 +464,14 @@
if (NULL == mep_url)
{
/* Assuming in-out mep */
- op_desc = axis2_op_create(env);
+ op_desc = axis2_op_create_from_module(env);
}
else
{
/* TODO
* We don't have a operation constructor taking mepURL as argument.
* do we need this? */
- op_desc = axis2_op_create(env);
+ op_desc = axis2_op_create_from_module(env);
}
op_name = AXIOM_ATTRIBUTE_GET_VALUE(op_name_att, env);
Modified: webservices/axis2/trunk/c/modules/core/description/module_desc.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/description/module_desc.c?view=diff&rev=448495&r1=448494&r2=448495
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/module_desc.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/module_desc.c Thu Sep 21 01:45:33 2006
@@ -309,7 +309,6 @@
op = (struct axis2_op *) val;
if (op)
AXIS2_OP_FREE(op, env);
-
val = NULL;
op = NULL;
Modified: webservices/axis2/trunk/c/modules/core/description/op.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/description/op.c?view=diff&rev=448495&r1=448494&r2=448495
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/op.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/op.c Thu Sep 21 01:45:33 2006
@@ -34,7 +34,7 @@
/*To store deploy time module QNames */
axis2_array_list_t *module_qnames;
axis2_array_list_t *engaged_module_list;
-
+ axis2_bool_t from_module;
}
axis2_op_impl_t;
@@ -352,7 +352,11 @@
const axis2_char_t *label,
const axis2_msg_t *msg);
-
+axis2_bool_t AXIS2_CALL
+axis2_op_is_from_module(
+ const axis2_op_t *op,
+ const axis2_env_t *env);
+
AXIS2_EXTERN axis2_op_t *AXIS2_CALL
axis2_op_create(
const axis2_env_t *env)
@@ -386,6 +390,7 @@
op_impl->module_qnames = NULL;
op_impl->engaged_module_list = NULL;
op_impl->op.ops = NULL;
+ op_impl->from_module = AXIS2_FALSE;
op_impl->op.param_container = (axis2_param_container_t *)
axis2_param_container_create(env);
@@ -615,10 +620,25 @@
op_impl->op.ops->register_op_ctx = axis2_op_register_op_ctx;
op_impl->op.ops->get_msg = axis2_op_get_msg;
op_impl->op.ops->add_msg = axis2_op_add_msg;
+ op_impl->op.ops->is_from_module = axis2_op_is_from_module;
+
+ return &(op_impl->op);
+}
+
+AXIS2_EXTERN axis2_op_t *AXIS2_CALL
+axis2_op_create_from_module(
+ const axis2_env_t *env)
+{
+ axis2_op_impl_t *op_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ op_impl = (axis2_op_impl_t *) axis2_op_create(env);
+ op_impl->from_module = AXIS2_TRUE;
return &(op_impl->op);
}
+
axis2_op_t *AXIS2_CALL
axis2_op_create_with_qname(
const axis2_env_t *env,
@@ -1999,4 +2019,13 @@
op_impl = AXIS2_INTF_TO_IMPL(op);
return AXIS2_DESC_ADD_CHILD(op_impl->base, env, label, msg);
+}
+
+axis2_bool_t AXIS2_CALL
+axis2_op_is_from_module(
+ const axis2_op_t *op,
+ const axis2_env_t *env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ return AXIS2_INTF_TO_IMPL(op)->from_module;
}
Modified: webservices/axis2/trunk/c/modules/core/description/svc.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/description/svc.c?view=diff&rev=448495&r1=448494&r2=448495
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/svc.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/svc.c Thu Sep 21 01:45:33 2006
@@ -927,7 +927,8 @@
if (val)
{
- AXIS2_OP_FREE((axis2_op_t *)val, env);
+ if (AXIS2_OP_IS_FROM_MODULE((axis2_op_t *)val, env) == AXIS2_FALSE )
+ AXIS2_OP_FREE((axis2_op_t *)val, env);
val = NULL;
}
}
Modified: webservices/axis2/trunk/c/modules/core/engine/conf.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/engine/conf.c?view=diff&rev=448495&r1=448494&r2=448495
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/conf.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/conf.c Thu Sep 21 01:45:33 2006
@@ -705,6 +705,13 @@
config_impl->transports_out = NULL;
}
+ if (config_impl->dep_engine)
+ {
+ AXIS2_DEP_ENGINE_FREE(config_impl->dep_engine, env);
+ config_impl->dep_engine = NULL;
+ }
+
+
if (config_impl->all_modules)
{
axis2_hash_index_t *hi = NULL;
@@ -897,12 +904,6 @@
}
axis2_hash_free(config_impl->faulty_modules, env);
config_impl->faulty_modules = NULL;
- }
-
- if (config_impl->dep_engine)
- {
- AXIS2_DEP_ENGINE_FREE(config_impl->dep_engine, env);
- config_impl->dep_engine = NULL;
}
if (config_impl->handlers)
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org